Installation
Learn how to install and authenticate the Web Offerwall SDK in your web application.
Read time 1 minuteLast updated 3 hours ago
Prerequisites
To implement our Web Offerwall, you need to implement the Self-managed currency postback. Also, create an app by using our publisher dashboard to access your SDK key.SDK Flow
The SDK needs to connect and validate the current user before we render the offerwall.
Adding SDK Snippet
Add this snippet to your HTML Code. By adding this snippet.The SDK can be used anywhere after this snippet. The following is an initialization example:<script> (() => { var t, a, p, j, o, y; (t = window), (a = document), (p = 'https://rewards.unity.com/owp/web/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>
<script> Tapjoy('init', { sdkKey: '<SDK_KEY>', publisherUserId: '<USER_ID>', eventName: '<PLACEMENT_NAME>', // default is '#WebOfferwall' }); </script>
Prefetching
By default, webofferwall is being preloaded on every sdkKey / publisherUserId change. You can stop prefetching the offerwall by addingpreload
init
If you want to preload later in the process, you can call theTapjoy('init', { ..., preload: false, })
preload
Tapjoy('preload');