Custom Events

Overview

Lion Analytics supports custom event creation, i.e., teams and developers can define their own events and parameters for their needs. However, Lion Analytics was designed to be a generalized approach for implementing event tracking for games across genres, so as a result, the need for instrumenting custom events should be very rare. The downside of using custom events will be covered in the next section.

Note that we consider an event a custom one when

  • the event call and structure are not predefined in the LionAnalytics module, or
  • the event mimics one of the predefined LionAnalytics events but does not follow the standard event schema, i.e., it includes different parameters

For example:

  • If a level-progression game fires an event called main_level_1_complete, which is not a predefined LionAnalytics event, it’s considered a custom event.
  • The game dev created an event called level_complete and added the following parameters: arena, chapter, and level_id. Even though the event name matches the predefined event name for tracking level progression, the parameters are not compliant with the standard event schema. As a result, this level_complete event is still considered a custom one.

The following decision flow helps you determine if you need a custom event:

Visual Chart Page Iteration 1.png

Why Should Custom Events Usage be Limited?

As mentioned in the Overview section, LionAnalytics was designed to be a generalized approach for implementing event tracking for games across genres, so the need for instrumenting custom events should be infrequent. The purpose of taking a generalized method for event tracking is to streamline our processes and avoid repeated efforts for different data products and solutions we provide for both internal and external partners. Below are the main data products and services that are impacted by the compliance of event tracking:

  • ETL tasks
    • ETL (Extract, Transform, and Load) tasks are jobs we create and run on a set schedule to make sure that our data can be used efficiently
    • Lion Studios own so many games and so much data, so these jobs are essential to facilitate any of the dashboards we build and the analyses we try to perform.
  • Looker products (Views/Explores/Looks/Dashboards)
    • The entire Looker model is built based on the Lion Analytics events schema to facilitate our Business Intelligence needs (data visualization and high-level data analyses)
    • Stakeholders already have access to ready-to-use content if games implement Lion Analytics events correctly, i.e., no additional development work needs to be done in Looker
    • In other words, noncompliance with the LionAnalytics implementation would lead to redundancy in Looker development work

In conclusion, by using LionAnalytics’ predefined, standard events, teams can be more efficient because we have set up pipelines to process the data and provide content that stakeholders can consume easily, making scaling the games possible and sustainable.

Example

This section provides examples for mapping custom events to LionAnalytics’ predefined, standard events. If you still have trouble finding a suitable event, please follow the Custom Event Decision Flow Chart above for your next steps.

Use Case Custom Event (event name & parameter usage) Standard Event (event name & parameter usage)
When a player completes a particular task task_abc_complete mission_complete → mission_name = “task_abc”
When a player trades an item they hold in inventory for some in-game soft currencies sell_item → item_name = “costume 1” → earned_coins = 100 economy* → product_spent = “costume 1” → product_received = “coins” → received_amount = 100
When a player unlocks a new level unlocklevel.10 feature_unlocked → feature_type = “level” → feature_name = “10”
When a player reaches a high score/score threshold score.50 achievement → achievement_name = “score.50”
When a player purchases an IAP iap.com.bundle.starter inapp_purchase → product_id = “iap.com.bundle.starter”

*The economy event’s parameter is simplified here for demonstration purposes

Event Validation

In case there is a compelling argument to implement a custom event, please check the following using the guide below and validate the event is being received on our backend: Event Validation