Manual Integration
Initialize After Media Source or MMP Initialization
Please initialize our SDK only after the media source or MMP data is initialized. This ensures that the media source data is sent correctly and prevents passing empty values.
If your platform is not supported, you can integrate with us manually by making HTTP requests to our API using any HTTP client.
Authentication
You can make a request to our API using any HTTP client by following the API documentation below
enYOUR_API_KEYYOUR_API_SECRETWeb4.0.0Publisher User/Customer unique ID
user_id_1User age
20User gender, 1=male, 2=female
1User email
user@example.comUser phone
6281234567890Device Identifier/Advertising ID Type
Device Identifier/Advertising ID
28dde889-530f-4a8e-b427-953077c40772Segment identifier passed as a JSON string (a stringified JSON object, not a raw JSON object).
{"promo_affinity_ratio":0.42,"dynamic_payer_segment":"NonPayer","activity_segment":"Tier 3","seniority_segment":"Tier 4","rewarded_video_watcher_category":"High"}Successful operation
OKUnsuccessful operation
Unsuccessful operation
Unsuccessful operation
POST /v4.0/initialize/auth HTTP/1.1
Host: api.tyrads.com
X-Api-Key: text
X-Api-Secret: text
X-SDK-Platform: text
X-SDK-Version: text
Content-Type: application/json
Accept: */*
Content-Length: 683
{
"publisherUserId": "user_id_1",
"age": 20,
"gender": 1,
"email": "user@example.com",
"phoneNumber": 6281234567890,
"identifierType": "GAID",
"identifier": "28dde889-530f-4a8e-b427-953077c40772",
"sub1": "text",
"sub2": "text",
"sub3": "text",
"sub4": "text",
"sub5": "text",
"userGroup": "{\"promo_affinity_ratio\":0.42,\"dynamic_payer_segment\":\"NonPayer\",\"activity_segment\":\"Tier 3\",\"seniority_segment\":\"Tier 4\",\"rewarded_video_watcher_category\":\"High\"}",
"mediaSourceName": "text",
"mediaSourceId": "text",
"mediaSubSourceId": "text",
"incentivized": true,
"mediaAdsetName": "text",
"mediaAdsetId": "text",
"mediaCreativeName": "text",
"mediaCreativeId": "text",
"mediaCampaignName": "text",
"engagementId": 1
}{
"data": {
"token": "eyJ2YWwiOiI3M3NIeUpNQlp4QzA1TlRHVzhxRExhWWNTeUQ5TTJIT0h3NXBvL3djVVp1Z09MR20wOTJJOTRReDBuYUFLeXhmVGRCaGYra2gvVGcydWFlbUh6aWR6S00vTmV0SEtVZVlWNk5Pdkc5Wnd5bytkSkxmUnA0aWt2eE9yQ01YTXF6LzBnRmZ3RUpucHMxem95WnRkYkVlQXJQNER3cDRZVkttb1lBdEIrZlB6cFZ3R25SSEE5UjROa2U2cGJTeTJod2c2UmI3UnN0QzZiN2Y2cENBYTlqaEhvQXhtdjM5UERPU2tDdWpHMmJIQ2N1cVRldVQ4a3hDSEE9PSIsInZlYyI6InNWbzZrejZRa09iS0tDeDUiLCJ0YWciOiJ1eDNnbjEwNEdUWXpvV1J2TTZVck1BPT0ifQ=="
},
"message": "OK"
}After obtaining the token successfully, you can pass the token to our iframe link and embed the iframe on your page.
For example:
Embedding The Iframe
If your website is using html, you can add an iframe to your page to integrate TyrAds web:
For example:
Implementation of Placement ID
The placementId identifies the specific placement (ad unit) that the offerwall or widget is opened from, allowing you to track and configure performance per placement. Pass it as an argument to the iframeUrl or iframePremiumWidget methods, and the SDK appends it to the generated URL as a placementId query parameter. The optional second argument lets you deeplink to a specific route (for iframeUrl) or specify a widget name (for iframePremiumWidget). The examples below show the method calls and their resulting URLs:
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. Click here
Localization
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. Click here
Last updated