Hiro provides a way to easily incorporate analytics and track the performance of your game. You can create custom analytics systems to send events to third-party services, and multiplex these analytics events to one or more analytics systems.
Hiro comes with built-in analytics systems for Firebase, Adjust, AppsFlyer, and Satori.
Initializing the analytics system #
The analytics system can be used to push events to multiple analytics systems which must be passed in as a dependency via the constructor, as well as an
ILogger instance. These analytics systems must implement the
IAnalyticsSystem interface. Hiro comes pre-packaged with systems for Satori, Firebase, Adjust and AppsFlyer.
The Satori analytics system pushes events into the Satori Live Ops Server and must be initialized with the connection credentials for the server as well as relies on the
The Firebase analytics system pushes events into a configured Firebase instance. You must provide a Firebase configuration JSON file.
The Adjust analytics system pushes events into a configured Adjust instance.
The AppsFlyer analytics system pushes events into a configured AppsFlyer instance.
Event taxonomy #
Hiro also provides a default taxonomy of events to standardize what should be sent by most games.
|When players install the game for the first time.|
|When the players log in to the game. This event can be triggered when the game is opened, switched to foreground, or when a new session on the server is established.|
|When the players close the game.|
|When players use a social account method or sign-up by a custom (such as e-mail) method provided within the game.|
|When a Rewarded Video ad is displayed to the players.|
|When a Banner is successfully displayed to the players.|
|When a player successfully completes and in-app purchase.|
|When a player starts a new game or level.|
|When a player successfully completes a level.|
|When a player fails to complete a level.|
|When a player manually restarts a level. The |
|When a player manually quits a level or the game.|
|When a player uses a power-up.|
|When players begin the FTUE. Games can have multiple tutorials, to differentiate different tutorials and |
|When players complete a step in a tutorial.|
|When players complete the FTUE.|
|When a player views a particular screen.|
|When one of the SDKs used within the game has been initialized successfully or failed to initialize.|
|Set the user across all analytics systems.|
|Set analytics user property to describe a player. This helps to analyze behaviors of various player segments by applying these properties as filters to your reports.|
|When the gameplay duration is reached to one of the following levels (ie. 5, 10, 15, 30, 45, 60 minutes). The duration should be calculated as the player’s total time consumed in the game. Session can vary game to game but the general definition is each time a new session id is generated between the server and client.|
These events can be logged directly by calling the associated method on the
AnalyticsSystem. For example:
You can also specify exactly which analytics providers you wish to submit the event to. If you omit this then the event will be sent to all.
Custom events #
You can also send custom events to the analytics systems. The following is an example of a custom event: