Table of Contents

Custom Events

If you want to track player behavior that isn’t specifically covered by the Analytics API, you can use Analytics.DesignEvent or Analytics.CustomEvent.

Design Events

Design events provide a simple and flexible solution to measure engagement with specific systems/funnels. They can be analyzed easily in GameAnalytics.

Example

Example of implementation of a design event:

Analytics.DesignEvent("start_flying_section", new DesignDimensions($"level_{levelId}", character_name, score: level_playtime));

This will lead to a GameAnalytics event looking like start_flying_section:level_2:dinosaur1, with a value of level_playtime.

Custom Events

Custom events are better suited to pass complex data to analyze player behavior, but require ad-hoc work on the Homa Analytics side. Do not use them unless specifically asked by your Project Manager. Only the event name will be sent to GameAnalytics, and none of the event parameters.

Example
Analytics.CustomEvent("level_bullets", new Dictionary<string, object>() {
    {"levelId", levelId},
    {"status", status},
    {"projectile0", projectiles[0]},
    {"projectile1", projectiles[1]},
    {"projectile2", projectiles[2]}
});

Custom Attributes

Note

Available from Homa Belly Core 3.0 onwards

All event methods now support an optional dictionary as the last argument for adding extra attributes. Use this feature only when requested by the Game Project Manager or Data Analyst.

Basic usage of a level complete event:

// Level is completed
Analytics.LevelCompleted();

With custom attributes:

// Level is completed
Analytics.LevelCompleted(new Dictionary<string, object>() {
    {"remaining_life", life},
    {"coins_earned", level_coins}
});