Web JavaScript widget
The widget renders a responsive offerwall in a page element. It still needs a valid RapidoReach UID. Generate that UID on your server for the signed-in user, then pass it to the widget. Do not expose your App Key in page source or browser JavaScript.
Setup
- Create a web app in the publisher dashboard and copy its App ID and App Key to protected server configuration.
- Generate a UID using the UID guide. The server must derive
internalUserIdfrom the authenticated session, rather than trusting a browser-supplied value. - Render the UID into your page and add the widget:
<div id="rapidoreach-offerwall"></div>
<script
src="https://www.rapidoreach.com/ofw/rapidoreach-widget.min.js"
data-user-id="{{ SERVER_GENERATED_UID }}"
data-container="#rapidoreach-offerwall"
data-height="720px"
></script>
The widget also supports data-uid-endpoint if you want it to request a UID from your authenticated backend. Return JSON such as { "uid": "..." }; validate the session on every request. If you use a custom endpoint, configure its request and response format for your application. The widget's default hosted UID endpoint accepts an App ID and end-user ID, so it should not be treated as proof that the caller owns that user ID.
Presentation
The container should be at least 320px wide. Use a fluid width so the offerwall fits mobile screens. Optional attributes include data-width, data-height, data-min-height, data-loader-text, data-language, and data-locale.
Listen for rapidoreach:ready, rapidoreach:load, and rapidoreach:error events to update your UI. These events do not authorize a reward. Configure a server-to-server callback and test verified reward delivery before launch.
For a direct iframe without the widget, see the iframe guide.