1. Home
  2. Integrations
  3. Android Unity Events Setup Guide
  4. Gaming Application – Android Unity

Gaming Application – Android Unity

We have provided a list of Events with their example usage that can be integrated for Gaming Applications. Please find them below:

1. Paid Subscription Deactivated Event

This is used to track when the Player has unsubscribed from any of the services of the Game.

You will need to call the below method to track the Subscription Deactivated event in your Application.

Java

public static void TrackPaidSubscriptionDeactivated
(string userID, Dictionary<string, object> extraParams);

 

  • Mandatory parameters (Paid Subscription Deactivated):                  
    • User Id – Unique User Identifier
  • Optional parameters (Paid Subscription Deactivated):                  
    • Page Name – Page that triggered the Event
    • Location – Geolocation of the Event

Sample Code

Dictionary<string, object> extrasParams = new Dictionary<string, object> ();
       extrasParams.Add (EventConstant.PAGE_NAME, “My Account”);
       extrasParams.Add (EventConstant.LATITUDE, 34.147785);
       extrasParams.Add (EventConstant.LONGITUDE, -118.144516);

       MTractionTracker.TrackPaidSubscriptionDeactivated (“123”, extrasParams);

2. Level Achieved Event

This is used to track Player’s progress in the game when he has successfully completed a level.You will need to call the below method to track the Level Achieved Event in your Application.

Java

public static void TrackLevelAchieved
(string userID, short level, int score, Dictionary<string, object> extraParams);

 

  • Mandatory parameters (Level Achieved):                   
    • User Id – Unique User Identifier
    • Level – Level Reached by the Player
    • Score – Score accumulated by the Player
  • Optional parameters (Level Achieved):                   
    • Rank – Player’s Rank

Sample Code

Dictionary<string, object> extrasParams = new Dictionary<string, object> ();
       extrasParams.Add (EventConstant.RANK, 5);

       MTractionTracker.TrackLevelAchieved (“123”, 5, 4560, extrasParams);

3. Achievement Unlocked Event

This is used to track the Game Player’s progress when he has completed any milestones to move to the next level of the game. You will need to call the below method to track the Achievement Unlocked event in your Application.

Java

public static void TrackAchievementUnlocked
(string userIDFrom, string identifier, Dictionary<string, object> extraParams);

 

  • Mandatory parameters (Achievement Unlocked Event):                   
    • User Id – Unique User Identifier
    • Identifier – Unique Identifier of the Level reached by the Player
  • Optional parameters (Achievement Unlocked Event):                  
    • Description – Details about the Achievement
    • Category – Category of the Achievement

Sample Code

Dictionary<string, object> extrasParams = new Dictionary<string, object> ();
       extrasParams.Add (EventConstant.DESCRIPTION, “Storm Trooper”);
       extrasParams.Add (EventConstant.CATEGORY, “Novice”);

       MTractionTracker.TrackAchievementUnlocked (“123”, “L10”, extrasParams);

4. Tutorial Completed Event

This is used to track the event triggered when the Player has completed any tutorials in the Game.

You will need to call the below method to track the Tutorial Completed event in your Application.

Java

public static void TrackTutorialCompleted
(string userID, SuccessFlag successFlag, string identifier);

 

  • Mandatory parameters (Tutorial Completed):                   
    • User Id – Unique User Identifier
    • Success Flag – TRUE OR FALSE based on the successful evaluation (if available) of the tutorial in the Game.
    • Identifier – Unique Tutorial Identifier

Sample Code

 MTractionTracker.TrackTutorialCompleted (“123”, SuccessFlag.True, “10008”);

 

Was this article helpful to you? Yes No

How can we help?