API Reference

init

Init call must be called before showing offerwall content. By default offerwall content is being preloaded.

Tapjoy('init', options);
Option Type Default Value Description
sdkKey* ID - Application SDK Key
publisherUserId* string - Publisher User ID used to reward users
ageRestrictedUser boolean false See User Privacy for value descriptions.
gdprConsentGiven boolean false See User Privacy for value descriptions.
userSubjectToGdpr boolean false See User Privacy for value descriptions.
usPrivacy string 1--- See User Privacy for value descriptions.
eventName string #WebOfferwall Placement Name
preload boolean false Whether to preload offerwall content
callback function () => {} Callback when initialization has completed
userTags array [] User Tags. e.g. ["TAG1", "TAG2"]

update

Update call updates initial data and acts as a reset for the SDK.

preload

Tapjoy('preload', options);
Option Type Default Value Description
callback function (err, status) => {} Callback when content is loaded

showOfferwall

Init call must be called before showing offerwall content. By default offerwall content is being preloaded.

Tapjoy('showOfferwall', options);
Option Type Default Value Description
node HTMLElement document.body Element that should
callback Function noop Function that is being called with current offerwall status

closeOfferwall

Closes any active offerwall windows.

Tapjoy('closeOfferwall');