Design Events (Implementation)
The purpose of this article is to expose more examples of custom events in GameAnalytics and how they should be sent, from the planning phase up to aggregation and visualisation part in the tool.
We illustrate the generation of these events with examples from our Unity SDK. The examples can be implemented in any other official GameAnalytics SDK by using the equivalent methods.
Design EventsCopy link to clipboard
- To better understand the space of possibilities with Design Events, we visualize a game that rewards the players with achievements for reaching various milestones such as killing a certain number of NPCs or for exploring the map.
- We also propose to track how much time it took the players to accomplish the achievements under the “Killing” category.
- We propose the following example of a hierarchy for tracking such achievements:
- Each level in the hierarchy will form a part in the name of the event.
- In order for our back-end to detect hierarchies, the event parts need to be separated by colons “:”.
- The composition of the first event in the scheme will be “Achievements:Killing:Neutral:10_Kills”.
- The “timePlayed” value is attached to the event separately as we can see the value “123” in the next code example.
GameAnalytics.NewDesignEvent ("Achievement:Killing:Neutral:10_Kills", 123);
- 123 represents the “timePlayed” value. The entire hierarchy can be generated dynamically.
Visusalizing “Killing” and “Exploring” Achievements
- For creating meaningful metrics about achievements, each corresponding event needs to be sent only once as the achievement can be unlocked only one time.
- GameAnalytics will count how many events have been aggregated (how many users unlocked the achievement) and the average “timePlayed” for each achievement under the “Killing” category.
Note: The tool also calculates the sum of the values but in this case the average time is more useful than total time.
- After the aggregation of the custom events (which can take up to 24 hours), metrics for each branch in the hierarchy are generated and they can be visualized using the explore tool.
- The events are grouped by “Count” in the image below to highlight how many users accomplished each achievement (each user sends an achievement event type only once in his lifetime). Many visualization combinations can be done using the “Explore” visualization tool available in GameAnalytics. Read more about this feature in the Explore article.
- In the same manner, the “Exploring” achievements can be visualized.
- If the “Mean” or “Sum” grouping option is selected for the “Exploring” achievements, the tool will return a “No data found” message since no value has been attached to the corresponding design events.
- Hierarchies can have up to 5 levels.
- As a result only 5 event parts should be described in the string attached to the “NewDesignEvent” method of the SDK you are using.
- Next we propose a much simpler hierarchy that covers the tracking of how many users have discovered a specific secret location where a secret weapon can be equipped.
- Similar to achievements, each unique design event needs to be triggered only once per user in order to track the number of users, not the amount of times the discovery of the secret weapons happened.
- Example of sending an event from this hierarchy via code:
- The generated metrics can be visualized in the same manner as the examples above.
- Design Events can be included as steps inside funnels to track how many users have executed a particular sequence of actions across all sessions in a specified date range.
- For instance, a tutorial inside a game can be monitor by creating the following hierarchy of events corresponding to each step:
- The lessons are counted using the 01, 02,.. counting method to make sure they are displayed in-order when using the event picker. The events need to be aggregated and also included in our database to be able to create a funnel using them. This can take up to two days, since we perform all the aggregations across all our games simultaneously.
- We swiftly fired 1 event for each of the lessons in the scheme from 1 to 6 and after aggregation we created and processed the following funnel:
Read more about the funnel feature in our dedicated article for Funnels.
Fair Usage Policy
Event id’s are strings separated by colons defining an event hierarchy – like
It is important to not generate an excessive amount of unique nodes possible in the event hierarchy tree.
Poor Implementation Example
level_namecould be 100 values
weapon_usedcould be 300 values
damage_donecould be 1-5000 perhaps.
This will generate an event hierarchy with: 100 * 300 * 5000 = 150M possible nodes. This is far too many.
Also, the damage should be put as a value and not in the event string.
The processing will perhaps be blocked for a game doing this and cause other problems when browsing our tool.
The maximum amount of unique nodes generated should be around 10k.