How to implement in-game analytics?
Event data surrounding player progress, tutorial, currencies, and more!
Read about the game site implementation here and general information on analytics on Pley here.
C# Example of firing events:
//Initialize analyticsKit with player properties
Pley.AnalyticsKit.Initialize(config);
//Example of how to fire an event
PleyResult result = Pley.AnalyticsKit.GameLoaded();
if (result != PleyResult.OK)
{
Debug.LogError("Failed to fire Pley analytics event game_loaded.");
}
/////////////////////////////////////////////////////////////////////////
//Example of how to fire an event with parameters
int playerLevel = 3;
PleyResult result = Pley.AnalyticsKit.LevelAdvanced(playerLevel);
if (result != PleyResult.OK)
{
Debug.LogError("Failed to fire Pley analytics event level_advanced");
}
Gameplay Events
These events are all optional and must be triggered using AnalyticsKit in the game code. If called from the Pley SDK AnalyticsKit, they'll be available on the game site for you to send to any analytics service (read more here).
Event | Description | Properties |
---|---|---|
gameplay_analytics_initialized | Triggered when you initialize AnalyticsKit, setting the basic user properties through the config. | username , level , application_version , custom_user_id , currencies[] |
gameplay_tutorial_advanced | When the player advances a step in the tutorial. | tutorial_step |
gameplay_tutorial_completed | When the player completes the tutorial. | - |
gameplay_tutorial_skipped | When the player skips the tutorial. | - |
gameplay_level_advanced | When the player advances a level (levels up or beats a mission, game dependent) | level |
gameplay_premium_spent | When the player spends premium currency. | name , amount , source , new_balance |
gameplay_premium_gained | When the player gains premium currency. | name , amount , source , new_balance |
gameplay_resource_spent | When the player spends game currency. | name , amount , source , new_balance |
gameplay_resource_gained | When the player gains game currency. | name , amount , source , new_balance |
gameplay_offer_shown | When the player is shown an offer, deal, liveOps, or promotion. | offer |
Custom Event | Set any game-specific custom event you need, and deliver it to your analytics services. | name ,parameters[] |
Click here to jump to the properties of gameplay analytics.
Updated about 2 months ago