SDK
v2.0
v2.0
  • Getting Started
    • Welcome
    • Start Here
    • Postback Payout (S2S)
    • Advanced options
      • Sending Media Source Data
      • Sending User Segments / User Info
  • Unity
    • Installation
    • Initialization
    • Obtaining Adverstising ID's
  • Android
    • Prerequisite
    • Installation
    • Initialization
      • Deeplinking Routes
      • Premium Offers
    • Obtaining Adverstising ID's
  • Flutter
    • Prerequisite
    • Installation
    • Initialization
      • Deeplinking Routes
      • Premium Offers
      • changeLanguage
    • Obtaining Advertising ID's
  • REACT NATIVE
    • Prerequisites
    • Installation
    • Initialization
      • Deeplinking Routes
      • Premium Offers
    • Obtaining Advertising ID's
  • Web / Iframe
    • Initialization
    • Premium Widgets
  • Questions and troubleshooting
    • Reporting bugs
    • Known issues
    • Changelog
Powered by GitBook
On this page
  1. Web / Iframe

Initialization

Integrating TyrAds web is easy and can be done by just passing the url in the in-app-browser or iframe:

https://websdk.tyrads.com/?apiKey=YOUR_API_KEY&apiSecret=YOUR_API_SECRET&userID=CUSTOMER_USER_ID&platform=web&av=3

Just replace the following values with your own.

  • YOUR_API_KEY

  • YOUR_API_SECRET

  • CUSTOMER_USER_ID

Deeplinking Routes

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

https://websdk.tyrads.com/?apiKey=YOUR_API_KEY&apiSecret=YOUR_API_SECRET&userID=CUSTOMER_USER_ID&platform=web

// Explicitly specifying the Campaigns Page by appending `&route=campaigns` to the URL

https://websdk.tyrads.com/?apiKey=YOUR_API_KEY&apiSecret=YOUR_API_SECRET&userID=CUSTOMER_USER_ID&platform=web&route=campaigns

// Activated Campaigns Page by appending `&route=campaigns-activated` to the URL

https://websdk.tyrads.com/?apiKey=YOUR_API_KEY&apiSecret=YOUR_API_SECRET&userID=CUSTOMER_USER_ID&platform=web&route=campaigns-activated

// Campaign Details Page (requires campaignID) by appending `&route=campaign-details&campaignID=YOUR_CAMPAIGN_ID` to the URL

https://websdk.tyrads.com/?apiKey=YOUR_API_KEY&apiSecret=YOUR_API_SECRET&userID=CUSTOMER_USER_ID&platform=web&route=campaign-details&campaignID=YOUR_CAMPAIGN_ID

// Campaign Tickets Page (requires campaignID) by appending `&route=campaign-tickets&campaignID=YOUR_CAMPAIGN_ID` to the URL

https://websdk.tyrads.com/?apiKey=YOUR_API_KEY&apiSecret=YOUR_API_SECRET&userID=CUSTOMER_USER_ID&platform=web&route=campaign-tickets&campaignID=YOUR_CAMPAIGN_ID

If your website is using html, you can use the following steps to integrate TyrAds web:

  • add an iframe to your page

<iframe id="tyrads_iframe" src="" height="650" width="300"></iframe>
  • provide the source URL dynamically to the iframe src attribute

<script type="text/javascript" deffered>
        (function () {

                var frameElement = document.getElementById("tyrads_iframe");
                var apiKey = "YOUR API KEY"
                var apiSecret = "YOUR API SECRET"
                var userId = "1234567890"
                frameElement.src = "https://websdk.tyrads.com/?apiKey=" + apiKey + "&apiSecret=" + apiSecret + "&userID=" + userId + "&platform=web";

        })();  
</script>

Localization

Introduction

Localization is a crucial feature that allows our application to support multiple languages, enhancing user experience across different regions. This documentation explains how to use the localization feature in our application, both through URL parameters and internal web application settings.

Localization via URL Parameters

Overview

To specify the language for our application using URL parameters, you can append the lang parameter to the URL. This method is useful for direct linking to language-specific pages.

Supported Languages

The following languages are supported:

  • English (en)

  • Spanish (es)

  • Indonesian (id)

  • Korean (ko)

  • Japanese (ja)

Usage Example

To access the application in Korean, you would use the following URL:

http://example.com/?apiKey=YOUR_API_KEY&apiSecret=YOUR_API_SECRET&userID=YOUR_USER_ID&newUser=false&platform=Android&hc=%23000F1E&mc=%232CB388&route=null&campaignID=null&sdk_version=1.1.11&av=3.0&lang=ko

Localization Inside the Web Application

Overview

In addition to using URL parameters, the web application itself can change the localization settings. This allows users to switch languages directly within the application.

Supported Languages

The same set of languages is supported as with the URL parameter method:

  • English (en)

  • Spanish (es)

  • Indonesian (id)

  • Korean (ko)

  • Japanese (ja)

Usage

  1. Access the Localization Settings: Navigate to the settings or preferences section of the web application.

  2. Select Language: Choose your preferred language from the list of supported languages.

  3. Apply Changes: Save your selection to update the application's language.

Best Practices

  • URL Encoding: When using URL parameters, ensure that special characters are properly encoded to avoid errors.

  • Language Codes: Use standard ISO language codes (e.g., en for English) for consistency and compatibility.

  • Testing: Always test the application in each supported language to ensure proper rendering and functionality.

Troubleshooting

  • Unsupported Languages: If a language is not supported, the application may default to a fallback language English (en).

PreviousObtaining Advertising ID'sNextPremium Widgets

Last updated 1 month ago