> ## Documentation Index
> Fetch the complete documentation index at: https://docs.manalens.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Metrics

> Definitions of the metrics in ManaLens reports: visitors, page views, sessions, bounce rate, session duration, revenue, live visitors, lifecycle, retention, conversion and game KPIs.

Every metric reads the same [events](https://docs.manalens.dev/data/events/overview.md). Date ranges use UTC days. Reports exclude bot events, unless you set the filter **Device: bot**. A bot event is in no session: when one visitor has bot events and human events, only the human events count, in page views and in sessions alike.

## Traffic

### Visitors

Unique visitors in the date range. A visitor is one `anonymous_id`: the persistent ID that the SDK stores in a first-party cookie. A visitor counts once in the period, even when active on several days. On a daily chart, a visitor counts once on each day that they are active.

Events without an `anonymous_id` (sent before consent in [consent mode](https://docs.manalens.dev/guides/consent.md)) do not count as visitors.

### Page views

The number of `page` events. Each `message_id` counts once, so a retried event does not count twice.

### Custom events

The number of `track` events.

### Sessions

The number of sessions that count. A session counts when it has at least one event that the website or the game sent: a page view or a custom event of the website, or an event of a [game session](#game-sessions-in-the-sessions-metric). A session is the client `session_id` that the SDK sends. A new session starts after **30 minutes** without events, and when the session is **24 hours** old. A session counts on the UTC day of its first event, and it does not split at midnight.

Each event from a website or a game has a session ID: the collector refuses an event that has an `anonymous_id` and no `session_id`, or a `session_id` equal to the `anonymous_id`. An event before consent has neither, and it is in no session.

A [server event](https://docs.manalens.dev/sdks/server.md) is the one event that can have no session ID. **Send the session ID of the client with your server call**: the event is then in that session, also when it comes late. Read the ID from the client SDK (`getSessionId()` in the web and Node SDKs, `get_session_id()` in Godot, `SessionId` in Unity) and send it to your backend with the request:

```ts theme={null}
// Browser: send the two IDs with the purchase request.
await fetch('/api/purchase', {
  method: 'POST',
  body: JSON.stringify({ sku: 'dlc_1', anonymousId: analytics.getAnonymousId(), sessionId: analytics.getSessionId() }),
});

// Backend (Node SDK, server mode): the purchase is in the session of the visitor.
analytics.track({
  event: 'purchase',
  userId: user.id,
  anonymousId: body.anonymousId,
  sessionId: body.sessionId,
  properties: { revenue: 9.99, currency: 'USD' },
});
```

A server event without a session ID is valid. It joins the session of the same visitor (`anonymous_id`) that is active at that time, or one that starts in the next 30 minutes. If there is none, the event is in no session that counts.

Every report uses this one definition: the Overview, sessions by source and by page, the chart breakdowns, [user paths](https://docs.manalens.dev/features/user-paths.md), [sessions per user](#sessions-per-user), the dashboard templates and SQL charts that read the `sessions` table (see [Explorer](https://docs.manalens.dev/features/explorer.md#the-sessions-table)). So, without a filter, the sessions of all sources add up to the Sessions of the Overview.

The `sessions` table of SQL charts reads stored session rows, so that a chart can read a long date range. A test in the repository compares it with the reports on each change. A [server event](https://docs.manalens.dev/sdks/server.md) is in the same session in both: with the session ID of the client, or attached by time when it has none. Two rare cases differ:

* A client that keeps one session ID for more than 24 hours. The reports split its events by inactivity. The `sessions` table has one session of at most 24 hours. The SDKs start a new session ID before that.
* A page view that a server sends with no session ID. In the reports it can be the entry page of the session that it joins. In the `sessions` table it adds a page view to the session that it joins, and nothing else. Send the session ID of the client with a server call.

Details:

* A session belongs to one visitor (`anonymous_id`). Events without an `anonymous_id` have no session.
* A report reads the events of its date range only. A session that starts before the range counts on the day of its first event in the range.
* A filter selects the visitors with a matching event. All sessions of those visitors count.
* A session has one source: the source of its first page view, or of its first event when it has no page view. A tagged page later in the session does not change it.

#### Game sessions in the Sessions metric

A game or app build (the Godot and Unity SDKs, or [app events](https://docs.manalens.dev/sdks/app-events.md)) sends events with `channel` `app` and no page view. A session with at least one event of channel `app` is a **game session**, and it counts as a session. So for a game, the Sessions metric, [sessions per user](#sessions-per-user) and [user paths](https://docs.manalens.dev/features/user-paths.md) have the game sessions.

A website session with custom events only (no page view) counts too. A [server event](https://docs.manalens.dev/sdks/server.md) that joins no session is not a session.

A game session has no page view, and a website session with custom events only has none. So such a session has no entry page and no exit page, and it is not in the bounce rate.

> [!NOTE]
>
> The Game KPIs and Game health templates count one run of the game from the session ID of the game SDK (`session_start` to `session_end`). The two numbers agree for the Godot and Unity SDKs, because the Sessions metric uses the same session ID. A game that stays open gets a new session every 24 hours (`session_end`, then `session_start`).

### Bounce rate

The share of the sessions with a page view that have one page view and no custom event. Lower is better. A session with no page view (a [game session](#game-sessions-in-the-sessions-metric), or a website session with custom events only) is not a bounce, and it is not in the sessions that the rate divides by.

### Session duration

The average time from the first event to the last event that the website or the game sent in a session, over all sessions that count (game sessions too). A session with one such event has a duration of 0. A [server event](https://docs.manalens.dev/sdks/server.md) is not user activity: it is in the session (its event and its revenue count there), and it does not change the duration.

### Where the session metrics are

The [Overview](https://docs.manalens.dev/features/overview.md) tiles and trend, the **Key metrics** and **Events over time** reports of [Ask AI](https://docs.manalens.dev/features/ask-ai.md), and the `kpis` and `event_timeseries` reports of the [MCP server](https://docs.manalens.dev/mcp/overview.md#sessions) show these figures. Daily sessions add up to the total of the date range, because a session counts on one day only.

With a filter, sessions, bounce rate and session duration count all activity of the visitors that match the filter. Visitors, page views, custom events and revenue count only the events that match. Ask AI and the MCP server do not show the session metrics with a filter on an event name or on an event property.

Sessions by source and by page, user paths, sessions per user and the dashboard templates use the same sessions. The Sources, Countries and Technology cards follow the same filter rule: a filter selects the visitors with a matching event, then all sessions of those visitors count. So with the filter "Channel is not Direct", a visitor with one paid session and one direct session adds a row for Direct.

### Live visitors

Visitors with activity in the last **five minutes**. This is a rolling activity count, not a signal that a browser tab is open. See [Live view](https://docs.manalens.dev/features/live-view.md).

## Revenue

### Revenue (events)

The sum of the numeric `revenue` property on custom events, for example `track('purchase', { revenue: 49 })`. Each `message_id` counts once. Revenue by source uses the acquisition fields on each revenue event.

### Billing revenue

Paid invoices and refunds from a connected billing provider (Stripe or Paddle), in the original currency. Recurring revenue uses the latest active or past-due subscriptions with a fixed price. Metered prices are left out; they do not count as zero. See [Revenue](https://docs.manalens.dev/features/revenue.md).

## People

A **user** is the explicit `user_id`, else the one user that the `anonymous_id` links to, else the `anonymous_id`. Retention, funnels, user paths, lifecycle and profiles count people. See [core concepts](https://docs.manalens.dev/data/concepts.md#people-and-identity-links).

### Identified users

People with a `user_id` from [`identify()`](https://docs.manalens.dev/guides/identify-users).

### Lifecycle stages

Each user active in the date range has one stage. The stages are checked in this order:

| Stage | Definition |
| - | - |
| **Churned** | No activity for more than 30 days |
| **New** | First active in the last 30 days |
| **Resurrected** | Active again after a gap of 30 or more days |
| **At Risk** | No activity for 14 or more days after earlier activity |
| **Returning** | All other active people |

Activity is page views and custom events. `identify` events do not count. See [Audience insights](https://docs.manalens.dev/features/audience-insights.md).

### Sessions per user

The number of [sessions](#sessions) of each user in the date range, in buckets: 1, 2, 3 to 5, 6 to 10, 11 to 25, 26 to 50, and more than 50. The previous period has the same number of days. A user with no session in a period (for example a user with server events only) is not in the report for that period. A player has game sessions.

## Engagement

### Funnel conversion

The share of people who complete each step of a [funnel](https://docs.manalens.dev/features/funnels.md) in order, within the conversion window (24 hours by default, from 1 minute to 90 days). An **open** funnel counts each step at any time in the range, in any order.

### Retention

The share of a cohort that does the returning event in a later week or day. A week starts on Monday (UTC). Period 0 is always 100%. **Recurring** retention counts a user in period N only when they return in that period. **Rolling** retention counts a user who returns in period N or later. See [Retention](https://docs.manalens.dev/features/retention.md).

### Crash-free sessions

1 minus the share of sessions with `app_unclean_exit` or an unhandled `critical` error. See [Errors and crashes](https://docs.manalens.dev/features/error-tracking.md#game-health-board).

## Game

The **Game KPIs** dashboard template reads the [app event conventions](https://docs.manalens.dev/sdks/app-events.md#event-conventions). A player is one install (`anonymous_id`), and only events that the game sends count: events with `context.app`. These are the app events of a native build (`channel` `app`) and the web events of a browser game that sets the [web SDK `app` option](https://docs.manalens.dev/sdks/web#app-context). [Server events](https://docs.manalens.dev/sdks/server.md) do not count, even with `context.app`. The Godot and Unity SDKs send `game_open`, `session_start` and `session_end` for you. A browser game sends them with `track`.

### DAU, MAU and stickiness

**DAU** is the average number of players active per day over the days of the date range. **MAU** is the number of players active in the 30 days that end on the last day of the range, whatever the range. **Stickiness** is DAU / MAU.

### D1, D7 and D30 retention

Day N retention follows the day the player returns. For each day of the range, take the players whose first `game_open` (`is_first_open` true) was N days earlier. DN retention is the share of them with a `session_start` on that day. So D30 has data in a 30-day range. The **Install cohorts** chart is the [retention report](https://docs.manalens.dev/features/retention.md) by day: players grouped by their first `game_open`, returning with `session_start`.

### Sessions per DAU and session length

**Sessions per DAU** is the number of game sessions (`session_id`) per player per active day. **Session length** is the average `duration_s` of `session_end` events, in minutes.

### ARPDAU and ARPPU

Revenue is the sum of `purchase` events from the game: `amount_cents` / 100, else the `revenue` property, in the purchase currency. Send one currency: the dashboard does not convert currencies, and the cards show no currency symbol. A retried event (the same `message_id`) counts once. **ARPDAU** is revenue per player per active day. **ARPPU** is revenue per paying player in the range.

### Levels and economy

The **Levels** table counts, per `level` value, the players who started it, the `level_start`, `level_complete` and `level_fail` events, and the fail rate: fails / (completes + fails). Numeric levels sort as numbers. The **Level funnel** goes from `game_open` to `level_complete` for levels 1 to 4; edit its steps for your own milestones (a funnel has up to five steps). **Currency sources and sinks** sums `amount` of `resource` events per `currency`, split by `flow` (`source` or `sink`).

## Acquisition

### Channel

The acquisition channel of an event (`channel_type`), such as Organic Search, Paid Social or Direct. The collector sets it from the campaign fields, click IDs and the referrer. Visitors and sessions use the source of the first page of each session. See [Attribution](https://docs.manalens.dev/attribution/overview.md).

> [!NOTE]
>
> Do not confuse `channel_type` (acquisition) with `channel` (event origin: `web`, `app`, `server` or a billing provider). See [common fields](https://docs.manalens.dev/data/events/common.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.