Deeplinking Routes

Min SDK version required: v1.1.4

The Tyrads SDK supports deeplinking to specific sections of the offerwall. When initializing or interacting with the SDK, you can specify a route to open a particular page. For campaign-specific routes, you'll need to provide the campaignID as well.

Available routes and their usage:

  • campaigns - opens the Campaigns Page

  • campaigns-activated - opens the Activated Campaigns Page

  • campaign-details - opens the Campaign Details Page (requires campaignID)

  • campaign-tickets - opens the Campaign Tickets Page (requires campaignID)


// Note: CAMPAIGNS is the default route when no specific route is provided
Tyrads.showOffers();

// Explicitly specifying the Campaigns Page
Tyrads.showOffers("campaigns");

// Activated Campaigns Page
Tyrads.showOffers("campaigns-activated");

// Campaign Details Page (requires campaignID)
Tyrads.showOffers("campaign-details", "your_campaign_id_here");

// Campaign Tickets Page (requires campaignID)
Tyrads.showOffers("campaign-tickets", "your_campaign_id_here");

Basic Usage

Here is an example of how to use the @tyrads.com/tyrads-sdk package:

import  Tyrads  from  '@tyrads.com/tyrads-sdk';
const  TYR_SDK_API_KEY  =  'YOUR_API_KEY';
const  TYR_SDK_API_SECRET  =  'YOUR_API_SECRET';
const  initializeTyrSDK  = () => {
  Tyrads.init(TYR_SDK_API_KEY, TYR_SDK_API_SECRET);
  Tyrads.loginUser(userId);
};

const  initializeAndShowOffers  = () => {
 initializeTyrSDK();
 Tyrads.showOffers();
};

Last updated