3. User Login

Upon initializing the SDK, the mandatory step is to log in the user. However, passing a user ID is optional and is only necessary when the publisher operates its own user system. This login process ensures that user interactions with the offerwall are accurately tracked and attributed within the application.

LoginData loginData = new LoginData(userId: "userId"); //userID is optional
_ = await TyrSDKPlugin.Instance.LoginUserAsync(loginData);
circle-exclamation

To determine when initialization has completed, you can await the login operation and read the relevant data from the returned LoginResult:

LoginData loginData = new LoginData(userId: "userId");
LoginResult result = await TyrSDKPlugin.Instance.LoginUserAsync(loginData);

if (result.IsSuccessful)
{
   //do anything what you want after successful init...
}

If you don’t set a user ID in LoginUser, you can retrieve the generated user ID after successful initialization by calling the following method:

var userId = TyrSDKPlugin.Instance.GetUserId();

3.1 Advanced Practices for personalized rewards

circle-exclamation

To maximize the value of our Tyr SDK please follow the advanced options for user login. This will allow us to personalize the rewards for the user event further and maximize the earnings for you as publisher.

Sending Media Source Data

Sending User Segments / User Info

Last updated