Feature is still in development and subject to change.
In order to implement our Web Offerwall, you will need to implement the Self Managed Currency postback. Once created, please contact Tapjoy with the Postback URL so we can create your SDK Key.
The SDK Key for Web Offerwall is required and will be provided by the Tapjoy team.
The SDK needs to connect and validate the current user before we render the offerwall. This is to ensure
Add this snippet to your HTML Code. By adding this snippet.
<script>
(() => {
var t, a, p, j, o, y;
(t = window),
(a = document),
(p = 'https://webofferwall.tapjoy.com/sdk/latest'),
'function' == typeof t[(j = 'Tapjoy')]
? t[j]('activator-reinitialized')
: ((t[j] = function () {
(t[j].q = t[j].q || []).push(arguments);
}),
(t[j].l = 1 * new Date()),
(o = a.createElement('script')),
(y = a.getElementsByTagName('script')[0]),
(o.async = 1),
(o.src = p),
y.parentNode.insertBefore(o, y));
})();
</script>
The SDK can be used anywhere after this snippet. See below for an initialization example:
<script>
Tapjoy('init', {
sdkKey: '<SDK_KEY>',
publisherUserId: '<USER_ID>',
eventName: '<PLACEMENT_NAME>', // default is 'iOS Offerwall - Web'
});
</script>
By default, webofferwall is being preloaded on every sdkKey / publisherUserId change.
You can stop prefetching the offerwall by adding preload
argument to your init call
Tapjoy('init', {
...,
preload: false,
})
If you want to preload later in the process, you can always call preload method.
Tapjoy('preload');