Events let you better understand what players are doing and can be useful for putting together a timeline of events for debugging.
To track an event, simply call
Talo.Events.Track() with an event name like "Level up". You can optionally attach properties to events by passing any number of extra
(string, string) tuples to the function call:
private void LevelUp()
timeTaken = 0;
Events are sent off in batches to prevent issues around rate limiting or using too much of your player's bandwidth. You can manually call
Talo.Events.Flush() to send off the events currently waiting in the queue. Flushing also happens automatically when:
- The game loses focus
- The game is paused
- In WebGL builds, after the time in seconds defined in the
webGLEventFlushRatesetting has elapsed. Unity doesn't implement the
OnApplicationQuitfunction for WebGL builds and as a result event tracking is slightly more unreliable. You can increase or decrease the
webGLEventFlushRatebut be wary of the reasons why events are batched described above.
Talo sends through some extra props with each event. These props are made up of the following metadata:
- The player's operating system
- The version of the game
- The window mode (fullscreen, fullscreen windowed, maximized window or windowed)
- The width of the game window
- The height of the game window
These properties are then attached as props to the player, providing you with extra tools for debugging possible bugs and configurations where they appear.