An example of how a publisher can integrate the webplugin integration to their website using a rewarded approach.
- It will not allow the webplugin integration to autostart
- It will change the number of lives provided based on the survey revenue
- It will change the approximate LOI (if provided by the survey) shown to the user
- It will handle the case where a survey is not available
More information can be found on the webplugin documentation.
The only thing you need to do to see this demo working is to just open or serve the index.html,
or you can just open a dev-server immediately after installing the live-server
npm package.
First install it
npm install live-server
then just run it and voila, you should be able to visit http://localhost:8080 to see the demo
live-server
(live-server might open the development server in a different port if the port 8080 is already occupied).
If you want your respondents to complete more than one survey, the best approach would be to use our Offerwall Integration but if for any reason you don't want to enable it, you can use the example provided in the multiple-rewards.html
to achieve a similar goal.
Since the start
method is not meant to be called twice, in order to avoid side effects and race condition issues, it is recommended that you only run the start
method after your user closes the panel AND has already screenedOut or finished successfully once.