Nonstop Javascript SDK
Nonstop Home
Nonstop Home can be opened by calling:
const nonstopHomeEarnContainer = document.querySelectorAll('.nonstop-home-earn-container')[0];
const baseUrl = window.location.pathname.replace('/', '');
Nonstop.default.presentNonstopHome(nonstopHomeEarnContainer, baseUrl);
This will open the Nonstop Home experience which is fully managed by the SDK.
Deeplinking
By default Nonstop Home opens on the Earn tab. To open it on another tab, direct the user to the correct URL for that tab from the baseUrl passed in to the initial method.
(In the below examples, we assume that baseUrl has been set to nonstop)
Valid URLs are:
/nonstop- opens the Earn tab/nonstop/history- opens the History tab/nonstop/how-it-works- opens the How It Works tab/nonstop/code- opens Nonstop Home on the code redemption screen/nonstop/promo/c003ea08-47e9-4e68-1b49-08d6b9051e8c- opens Nonstop Home at a specific promo