Events
An event is an action that occurs in your game, such as when the game starts, or when the player does something like find a treasure or buy an item. Events contain contextual information around that action, such as the item that was obtained, how much currency the player had, and how the item was acquired. These can be customized to suit your game and send useful information to you. Events can be used to measure player engagement, spending, and conversion through the Data Explorer and funnels.
An event is a collection of parameters that provide a snapshot of the player's state at that moment. For example: missionStarted
and missionCompleted
events might have the parameters missionID
and missionName
to describe which mission the events refer to. Over time these snapshots combine to form a complete picture of the player's behaviour.
Events are split into two categories:
- Standard events are provided for you and cannot be edited. These encompass several key metrics that are widely applicable to many games, and most of them are sent automatically by the Analytics SDK. For information about standard events, see the standard events page.
- Custom events must be created to fufil the unique requires of your game. For information about how to create custom events, see the create a custom event tutorial.
Once you are happy with the shapes of your events on the dashboard, you can record them from your game.
What needs to be tracked in the game?
When you design something in your game, you need to have a reason for it. Track how players interact with your game to validate your intentions and answer questions such as:
- How difficult is this level?
- Is my tutorial easy to follow?
- Have a lot of players purchased this offer?
For the question "Is this level as hard as I think it is?", you could track when a player finishes a dungeon with an event called dungeonCompleted
and parameters like:
dungeonName
: Which dungeon was finished.time
: How long it look for the player to finish.deathCount
: How many times the player died before reaching the finish.playerHealth
: The health of the player at the end of the dungeon.potionsUsed
: How many potions the player used to finish the dungeon.
These events and details can then be used to create custom dashboards or in the Data Explorer to help you answer your original questions and monitor the health of your game.
Common tracking scenarios
First time user experience
In this case you want to check how many players complete the tutorial. Use a custom event that triggers once a tutorial step is completed, such as tutorialStepCompleted
with a stepID
parameter to indicate which step was completed.
If you want more granularity in your tutorial analysis, you can also add an event that tracks when the tutorial begins so that you can determine if the tutorial is starting properly for all players. You can also add an event when the tutorial ends when a step is started to follow the complete player journey in the tutorial.
You can understand user drop off and where to optimize better with more custom events added to track within the first-time user experience.
An item is bought
For every virtual or real currency transaction in the game, you should always record a transaction
event. The transaction
standard event is used to populate the revenue dashboard and metrics in the Data Explorer. You can validate your revenue using the transaction
event and the Unity IAP plugin. The transaction
event already has many useful parameters to register what the player spent money on, how much they spent and what they received. All the parameters under productsReceived
and productsSpent
help you get set up.
For more information, see the record transaction events tutorial.
Feature adoption
Use both standard and custom events to measure the success of new features within the game and how users adopt them. For example, you might want to introduce guilds into the game. This is a feature which is important for long-term engagement and player interactions, especially for RPGs. You could implement the following events to track guild engagement:
guildJoined
: User joins a guild.guildLeft
: User leaves a guild.guildMessageSent
: User sends a message in guild chat.guildRole
: User has an admin role within the guild.
Analyzing each of these events helps you determine how active users are within the guild feature and they can also be used with existing events to see their overall engagement with the game. Try comparing users who join a guild versus those who don't; it's possible that users in guilds spend more money or play more often.
Player lifecycle
Tracking the user's lifecycle throughout the game is important to determine when they stop playing the game or to identify any other issues with the game.
You could track users with events such as:
characterLevelUp
: The current level of the user.transaction
: When a user makes a purchase.guildJoined
: When a user joins a guild.currencyGained
: Amount of in-game currency gained.
Using a variety of events is useful to see how users are engaging with the game and if there are any dropoff points that need optimizing. Analyzing level distribution shows what level users get to before they stop playing. Additionally, tracking their transactions is important as spenders are often more engaged in the game and play for longer.