Initialization

1. Setting Up

Drag and drop the Tyr SDK prefab that you imported previously to your main menu scene. Location: Assets/Plugins/TyrAdsSDK/TyrAdsSDK.prefab

  • Api Key: The API key (32 hexadecimalmal string)

  • Api Secret: The API secret (92 hexadecimal string)

2. Initialization

SDK Initialization best practices:

This step initializes the Tyrads SDK within your application. You need to provide the API key and API secret obtained from the Tyrads platform. This allows your app to communicate securely with Tyrads' servers.

3. User Login

Upon initializing the SDK, it is mandatory to save the user data in app storage to retain the user data. A unique GAID is generated the first time the user installs the SDK, and this GAID is passed to the initialize() method in TA_API. This method checks if the user is new to create a new user or update an existing one. This login process ensures that user interactions with the offer wall are accurately tracked and attributed within the application.

4. Player Profile

Set your player profile at the app launch

TyrAds.SetProfile(string userId, int gender, int yearOfBirth)

The parameter of this call:

  • userID: A custom string identifier that you can assign to the user. If you don't already have one for the user, set this parameter as an empty string "", the SDK will generate it automatically.

  • gender: The gender of the user. Enum: 0 for male, 1 for female

  • yearOfBirth: The year of the user's birthday. Format: YYYY

Last updated