# Analytics and metrics reference

This page defines every number on the **Dashboard**, the **Analytics** page, a game's **Performance** and analytics sections and the **Revenue** page of the developer console, exactly as the portal computes it today. Read it before you compare two numbers, tune a game against a launch target or question a drop. Unfamiliar terms are in the [glossary](https://docs.zokogames.com/getting-started/glossary).

## What your game must do

Nothing is instrumented for you except the two calls that start and stop a play. Call them around real gameplay (not around menus or loading), once per play:

```js
const SDK = window.ZokoGames.SDK;
await SDK.init();

startRound();                     // your code
await SDK.game.gameplayStart();   // counts one play and starts the playtime clock
// ... the player plays ...
await SDK.game.gameplayStop();    // ends the clock; also call it on pause, game over and menu
```

Both calls are asynchronous. In local mode (your own `localhost` page) they resolve and send nothing, so the console stays empty until the game is live. When the player has not allowed analytics cookies, the play is still counted but its playtime is missing (see the consent section). A game that never calls `gameplayStart` records no plays and no playtime, whatever players do.

The SDK side (`SDK.analytics`, `trackOrder`) is on the [analytics module page](https://docs.zokogames.com/sdk/analytics); `trackOrder` counts one anonymous order event per accepted call and does not store the order itself. For the launch targets built on these numbers see [basic launch metrics](https://docs.zokogames.com/guides/basic-launch-metrics) and [launch stages](https://docs.zokogames.com/getting-started/launch-stages).

## Where the numbers come from

Three sources feed the console:

1. **Game events.** The portal's player frame sends events to the portal's own event endpoint: a *view* when the player presses Play, `gameplay_start` and `gameplay_stop` when your game calls `SDK.game.gameplayStart()` and `gameplayStop()`, and the ad events below. Each event is stored with a device class and a country (from the request) and, only with consent, a random visitor id.
2. **Tile counters.** Game tiles on the portal report *impressions* and *clicks* as anonymous daily counters. No visitor id is sent or stored for them.
3. **Revenue.** Gross revenue is **imported** by the portal team from the ad provider's reports. It is not computed from events.

Events from games that are not live (drafts, games in review, the Preview tool) are ignored. Only games in basic launch, full QA or full launch are counted.

## Definitions

| Metric | Exactly what it is |
| --- | --- |
| **Plays** | Number of `gameplay_start` events. A play is counted when **your game calls `gameplayStart()`**; the portal does not infer it. A game that never calls it records no plays and no playtime. |
| **Views** | Number of times a player pressed Play and the game loaded in the frame. |
| **Players** | Distinct visitors per day, added up over the days of the range. Someone who plays on three days counts three times. |
| **Playtime** | For each `gameplay_start`, the time until the next `gameplay_stop` of the same visitor, capped at **30 minutes**. A start with no stop (or followed by another start) adds 0 seconds. A session belongs to the day it started. |
| **Average playtime** | Playtime divided by plays, both counted only for players who allowed analytics (only they record a stop). |
| **Conversion** | Sessions of at least **60 seconds** divided by views. |
| **Impressions** | A tile was at least 50 % visible for at least 1 second while the page was visible, counted **once per tile per page view** (a client-side navigation starts a new page view). One impression per game and surface per batch; a game can sit on several surfaces of one page. |
| **Clicks** | A click on a tile link that opens the game page. At most one per game per batch. |
| **CTR (click-through rate)** | Game views divided by tile impressions for the same visitors (see the consent section). Never above 100 %. In an artwork experiment the per-arm CTR is tile clicks divided by impressions of that arm. |
| **Ad requests** | `ad_started` events: every ad the portal asked a provider to play. |
| **Ad impressions** | `ad_impression` events: an ad the provider actually displayed. A rewarded ad the player closed early after it appeared still counts as an impression, without the reward. |
| **Fill rate** | Ad impressions divided by ad requests. Shown as a dash until your game has requested an ad. |
| **eCPM** | Gross revenue divided by ad impressions, times 1,000. Shown as a dash until an ad has been shown. |
| **D1 retention** | Of the players seen on a day, the share who show up again the **next** day. |
| **D7 retention** | Same, seven days later. Only days that already have a day 7 are counted. |
| **D30 retention** | Same, thirty days later. The **Retention by day played** table shows day 1, 7 and 30 for each day: everyone identified who played that day, new or not, so a player who plays on several days is in each of them. |
| **New and returning players** | A visitor is *returning* for a game when they had any event for it on an earlier day, otherwise *new*. Based only on identified visitors (see below). |
| **Rating** | Thumbs up divided by all votes, over the lifetime of the game. |

The CSV downloads and the developer API name the same figures with fixed column names, which do not change with the console's language:

| Column | Console name |
| --- | --- |
| `gameplays` | Plays (Games started in the funnel) |
| `views` | Views (Play pressed in the funnel) |
| `impressions` | Impressions (Shown in a list in the funnel) |
| `players` | Players |
| `playtime_sec` | Playtime, in seconds |
| `avg_playtime_sec` | Average playtime, in seconds |
| `d1_retention`, `conversion`, `ctr`, `fill_rate` | Day 1 return, Conversion, Click-through, Ad fill rate, as fractions from 0 to 1 |
| `ad_requests`, `ad_impressions` | Ad requests, Ad impressions |
| `revenue_usd`, `gross_usd`, `share_usd`, `ecpm_usd` | Revenue, Gross revenue, Your share, eCPM, in the currency the name ends with |
| `share` (country and device files) | Share of plays, as a fraction from 0 to 1 |
| `plays` (country and device files only) | Plays. These two files predate the others and name this figure `plays`; everywhere else it is `gameplays` |
| `day`, `game` and `slug`, `country` or `device` | The row's key: a UTC date (`YYYY-MM-DD`), the game's name and address slug, or the country code or device class (`other` folds in groups under five players) |

The columns of a game's table on screen are all in its CSV except eCPM, which the file leaves out (divide `revenue_usd` by `ad_impressions` and multiply by 1,000). The "By player type" file is built in the browser from the table and uses the same names.

Every CSV starts with a UTF-8 byte order mark, so Excel shows accented and non-Latin game names correctly; a script that reads the file as plain UTF-8 should strip it (in Python, open the file with `utf-8-sig`). A rate that cannot be calculated, such as click-through on a day with no impressions or retention on a day nobody played, is an **empty cell**, the same as the dash on screen; a count of nothing is `0`. The per-game file lists every game of the studio, with zeros for a game that had no activity in the range.

Ad breaks that an ad-free member skips (see [player features](https://docs.zokogames.com/guides/player-features)) request no ad and are not counted at all.

## What needs player consent

Players choose cookie categories in the portal's consent banner. Kids mode and kids games turn every optional category off. The split matters for reading your numbers:

| Event | Needs the *analytics* category? |
| --- | --- |
| `gameplay_start` (plays), `ad_started`, `ad_impression`, `ad_finished` | **No.** Always recorded, as anonymous aggregate rows with no visitor id. `order` events work the same way: `SDK.analytics.trackOrder` sends one, counted anonymously. |
| Views, `gameplay_stop`, loading, happy time, completion | **Yes.** Not sent without it. |
| Tile clicks, and impressions in experiment arms | No. Counters only. |
| Tile impressions in the all-traffic numbers (the denominator of CTR) | **Yes.** Counted only for visitors who allowed analytics, so the CTR numerator and denominator come from the same group. |

Effects you will see:

- **Rates compare the same players.** Playtime needs a recorded stop, which only consenting players produce, so average playtime, conversion, CTR, retention and plays per player are measured among consenting players on both sides of the division. Plays still count everyone, so plays can be far higher than views.
- **Views, conversion, CTR and impressions cover consenting players only.** They are a sample, not a census, and can be lower than the real total.
- **Retention follows consenting players.** Visitors who did not allow analytics have no id, so they cannot be followed from one day to the next. They share one anonymous id, which never counts as returned.
- **Players is a floor.** Non-consenting visitors collapse into one anonymous id per game, country, device and day.
- **New versus returning** includes only identified visitors; anonymous traffic appears only in the "all players" view.
- **Country and device breakdowns.** Plays count everyone and players count only players who allow analytics, with one exception: for days recorded before consenting players were stored separately, and for groups made up only of visitors who did not allow analytics, the player count falls back to all traffic, where those visitors count as one. When a row has no consenting plays on record, its playtime per play is shown as unknown rather than estimated.

The console says so next to the figures ("counts only visitors who allowed analytics"). Compare periods and games with the same audience mix, and judge trends rather than single values. Small samples swing: below 100 plays in a range the console shows a "not enough data" notice. In the country and device splits (and browser and system on a game page), rows with fewer than five players are grouped under **Other** on screen and in the CSV, so a small group of players cannot be singled out; when no row reaches five players, the split says it is held back instead of listing anything.

## Days and time zones

Every day boundary is **midnight to midnight UTC**, in the charts, the CSV exports, retention and the statements. The periods are complete days ending yesterday: the dashboard totals cover the last 30, a game's Performance and the Analytics page open on 28, and Analytics also offers 7, 30 and 90. The thumbs-down card on a game's Feedback page is the exception: it counts the last 7, 30 or 90 days up to now, by the time of the vote. A game popular late in the evening in the Americas can show those plays on the next UTC day. A session is attributed to the day it started, even if it ends after midnight.

## When numbers update

| What | Refreshes |
| --- | --- |
| Plays, views, playtime, ad counts, retention | A scheduled job runs **hourly, at five past the hour**. It recomputes yesterday and today from the raw events, so a day settles once the job after midnight has run. |
| Tile impressions and clicks | Added to today's counters immediately. |
| D1 retention of a day | Needs the following day, so it appears after the job that rolls the next day. The newest day shows a lower number until tomorrow. |
| D7 retention of a day | Needs seven more days. |
| Revenue, eCPM | When the portal team imports the provider's figures; usually later than the counts. Estimates until the month closes. No ad network is connected yet, so both stay empty for now. |
| Launch KPIs | A separate hourly job snapshots them for reviewers. |

Raw events are kept for a limited time and rolled into daily totals; retention for the oldest cohorts is derived from what is still stored.

## Limits that can drop events

The event endpoint is public, so it bounds each client:

- Per IP address and game, per day: 40 views, 60 gameplay starts, 120 ad requests, 120 ad impressions and 120 ad finishes. Further events are dropped silently.
- Ad events are accepted only for games in full launch with ads enabled that are not kids games, at most one ad request or impression per IP and game every 10 seconds. An ad impression must carry the short-lived ticket returned for its ad request.
- Tile batches are capped (40 items, 5 per game and kind), bots are ignored, and each IP has hourly and daily budgets.
- Many players behind one shared address (a school or office network) can hit a per-IP cap.

## Reading it in practice

- In **basic launch** ads are off, so Revenue, Ad impressions, Ad fill rate and eCPM show a dash under "Ads are off in Basic Launch" instead of 0. Only a few basic launch games are placed on category, tag and New lists, so Impressions can stay low and Click-through empty; plays from your own links still count.
- Use **plays per player**, **average playtime** and **D1** together; any one alone misleads.
- Split by device and country before concluding anything. See [mobile](https://docs.zokogames.com/guides/mobile).
- A fill rate below 100 % is normal: it falls when an ad blocker is detected, the provider has nothing to show, or the break was capped.
- eCPM is revenue-side only. Compare it across periods, not with player counts.

## Next steps

- [Basic launch metrics explained](https://docs.zokogames.com/guides/basic-launch-metrics)
- [Developer API reference](https://docs.zokogames.com/guides/developer-api)
