Overview
The Reditus referral widget is loaded via the Pageview Tracking Script, that should already be installed in your app. You should add the following snippet where your frontend has access to user data and the JWT token from your backend. Once you invoke thegr("loadReferralWidget", ...) method, it automatically fetches the referral program code and makes the widget available through window.referralWidget.
Example Usage
Javascript
Parameters
Once called, the script fetches the referral widget and attaches it to window.referralWidget, allowing you to interact with it in your application.
Next steps
Check out Authenticating the User to learn how to generate theauth_token (JWT).