Retention
See who comes back, week after week
Retention shows whether people come back. Viakite groups people into cohorts by the day, week or month they first came, and shows what share of each cohort came back in each period after: of the people who first came in the week of 2 November, how many came back the week after, two weeks after, and so on.
How retention counts
Retention counts signed-in users: the people your site identifies, by your user id, across days and devices. The anonymous events a visitor sent before signing in that day count for them too. Visitors who never signed in are left out.
- A person's cohort is the period of their first page view or custom event in the date range. People who were already seen before the range join no cohort, so each cohort holds only people who were new then.
- Period 0 is the cohort's own day, week or month. Period 1 is the one after it, and so on. Weeks start on Monday, and days, weeks and months follow your project's time zone.
- A person came back in a period when they viewed a page or sent a custom event in it.
- A period that hasn't started yet stays empty.
You can change what starts a cohort and what counts as coming back. Pick a custom event, such as Signup to start and Purchase to come back, and the grid shows the share of new sign-ups who bought in each week after.
Why visitors don't come back
You can count visitors instead of users, but without cookies a visitor's id changes every day (see Privacy). A visitor can't be recognised on a later day, so every visitor cohort shows 0% after period 0. To see who returns, identify your users.
Retention in the dashboard
Go to Analytics → Retention. The grid shows one row per cohort, with its people, then the share who came back in each period, shaded darker or lighter by that share. The Average row at the top adds up every cohort that has reached each period. Hover over a cell to see how many people that is.
Above the grid:
| Control | What it does |
|---|---|
| Cohorts by | Days (14 days after), Weeks (8 weeks after) or Months (6 months after) |
| Count | Signed-in users, or visitors |
| First did | Any page or event, or one custom event: a person's cohort is when they first did it |
| Came back and did | Any page or event, or one custom event |
The date range and filters at the top of the page choose who joins a cohort: the filters apply to the first event, such as only people who first came from Google. A range may hold up to 100 cohorts, so daily cohorts work for ranges up to about three months.
Retention with the API
Run the report on your region's data host, https://us.api.vk.viabio.me, with the analytics.view permission:
1curl https://us.api.vk.viabio.me/v1/projects/prj_…/analytics/retention \2-H "Authorization: Bearer sk_live_us_…" \3-H "Content-Type: application/json" \4-d '{5"date_range": { "preset": "90d" },6"granularity": "week",7"first_event": { "type": "event", "value": "Signup" },8"return_event": { "type": "event", "value": "Purchase" }9}'
Every field is optional:
| Field | What it is |
|---|---|
date_range | When people first came; the last 30 days by default |
granularity | day, week (the default) or month |
periods | How many periods after the first to show, 1 to 30; 14 days, 8 weeks or 6 months by default |
count_by | users (the default) or visitors |
first_event, return_event | A page ({ "type": "page", "value": "/pricing" }, * for any part) or a custom event ({ "type": "event", "value": "Signup" }, with optional conditions on its properties, as in funnels). Without one, any page view or custom event counts |
filters | The same filters as every report; they apply to the first event |
The answer lists cohorts, oldest first. Each has its start (its first day, such as 2026-11-02), its size, and per period from 0 to periods the people who came back (retained) and their share of size in percent (rates). A period that hasn't started is null. average gives, per period, the share who came back over every cohort that has reached it.
1{2"cohorts": [3{ "start": "2026-11-02", "size": 45, "retained": [45, 22, 8, null], "rates": [100, 48.9, 17.8, null] }4],5"average": [100, 46.2, 21.7, 7.5],6"granularity": "week",7"periods": 3,8"count_by": "users",9"date_range": { "from": "2026-08-25T00:00:00Z", "to": "2026-11-23T00:00:00Z" }10}
A range with more than 100 cohorts answers 422 validation_error.
What doesn't work yet
Gaps in retention today
- No retention for anonymous visitors. Visitors can't be followed across days without cookies, and cross-session mode isn't built.
- No saved retention reports, and no export of the grid to CSV.
- Not on public pages. A shared dashboard doesn't show retention.