# Analytics

**URL:** https://heroiclabs.com/docs/hiro/concepts/analytics/
**Summary:** How Hiro turns player behavior into analytics events, where those events come from, and where you can send them.
**Keywords:** analytics, analytics events, event tracking, event metadata, event value
**Categories:** hiro, analytics, concepts

---


# About analytics in Hiro

Every LiveOps decision depends on knowing what players actually do: which levels they complete, which offers they buy, where they drop out of a tutorial. Analytics is how Hiro captures that behavior as a stream of events you can measure and segment on. This guide explores where those events come from and what shape they take so that you can act on your data with confidence.

## Two sources of events

Some player behavior is only visible on the client, like which screen a player opened, an ad they saw, or a button they tapped. The [analytics system](../../unity/analytics/), which ships with the Unity SDK, captures these events on the client.

Other behavior is authoritative on the server, such as currency granted by a reward, an achievement claimed, or a leaderboard score submitted. Hiro's systems know when these happen, so they emit their own events through [publishers](../publishers/), server-side listeners that receive Hiro events and forward them on. You don't have to send these events yourself, you just choose which types of events you care about and your publishers handle the rest.

## Where your events go

Hiro is only responsible for producing events; you decide where they go. Those destinations are _analytics providers_: services like Satori, Firebase, or GameAnalytics that receive and store your events, each added to your game as a Hiro [integration](../integrations/). On the client, every provider you register receives each event, and you can also write your own. On the server, you register [publishers](../publishers/) that forward events to whatever backend you use. Nothing about the analytics system ties you to a particular vendor.

### Integrating with Satori

[Satori](../../../satori/) is Heroic Labs' LiveOps platform, and Hiro ships with a two-way integration to it out of the box. On the server, the built-in [SatoriPersonalizer](../publishers/#satoripersonalizer) publisher writes events to Satori; on the client, the `SatoriSystem` provider does the same. Both a player's client actions and server-authoritative outcomes end up in one profile.

What sets Satori apart as a destination is that it doesn't just receive events, it feeds decisions back into the game. Behavior you send becomes the raw material for [metrics](../../../satori/concepts/performance-monitoring/track-custom-metrics/), [reports](../../../satori/concepts/performance-monitoring/), and [audiences](../../../satori/concepts/segmentation/understand-audiences/), and `SatoriPersonalizer` reads that segmentation back as remote configuration. Define an audience like "players who reached level 10 but never finished the tutorial", and Satori delivers targeted config to them, such as a reminder prompt or a gentler difficulty curve.

{{< note "important" "Automatic events in Satori" >}}
Satori also emits a few events on its own. Sessions produce `_sessionStart` and `_sessionEnd`, so you don't need to track session length yourself. Each change to a player property emits a `_propertiesUpdate`, which you can't suppress, so batch property changes rather than writing them one at a time. See [Understand events](../../../satori/concepts/performance-monitoring/understand-events/#synthetic-events) and [Sessions](../../../satori/concepts/sessions/).
{{< /note >}}

## How an event is shaped

Every analytics event contains three fields: a `name` that identifies it, `metadata` for context about a single occurrence, and a `value` that's used to power metrics.

{{< note "important" "Value, metadata, or property" >}}
Each field suits a different kind of data:

- Use `value` for a number whose latest reading means something on its own and can feed a metric, like the score from a finished match. Satori turns this field into metrics and computed properties.
- Use `metadata` for per-moment context about a single occurrence, like the number of cards left in a player's hand when they played a card.

See [Understand events](../../../satori/concepts/performance-monitoring/understand-events/) for a deeper understanding of each field.
{{< /note >}}

Hiro ships with a set of built-in events tied to its systems. The economy system emits `currencyGranted` and `currencySpent`, the achievements system emits `achievementClaimed`, and so on across every system.

Review the full list of built-in [server events](event-reference/) and [client events](../../unity/analytics/#default-client-events). You can also send [custom events](../../unity/analytics/#custom-events) with names of your own choosing.

## See also

- [Analytics in Unity](../../unity/analytics/)
- [Publishers](../publishers/)
- [Server events](event-reference/)
- [Understand events (Satori)](../../../satori/concepts/performance-monitoring/understand-events/)
- [Player properties (Satori)](../../../satori/concepts/segmentation/understand-player-properties/)
- [Sessions (Satori)](../../../satori/concepts/sessions/)
