Retention/p/[project]/retention

Whether anybody comes back

Acquisition figures go up and to the right for a long time before anybody notices that none of it sticks. Retention is the report that catches it: of the people who arrived in a given period, how many were still there the next one, and the one after that.

The retention page: a cohort grid with each row a cohort and each column a period, shaded by return rate, above a stickiness distribution.The retention page: a cohort grid with each row a cohort and each column a period, shaded by return rate, above a stickiness distribution.
Daily cohorts

Cohorts by day, week or month

Each row is the group of people first seen in a period; each column is how many of them came back later. Daily cohorts for a product with a daily rhythm, monthly for a business with a long one. The grid re-computes rather than approximating one from the other.

A cohort retention grid, rows by cohort date and columns by period, cells shaded by retention rate.A cohort retention grid, rows by cohort date and columns by period, cells shaded by retention rate.

Stickiness

How many distinct days in the period a person was active, as a distribution rather than a single ratio. One number cannot distinguish a product used once a month by everybody from one used daily by a tenth of them, and those are opposite businesses.

A stickiness distribution chart showing how many days in the period visitors were active.A stickiness distribution chart showing how many days in the period visitors were active.

Longer windows, same query

Switching to weekly cohorts over ninety days is a control on the page, not a different report. The underlying data is a per-person daily rollup maintained as a materialised view, so a twelve-month grid is not a twelve-month scan.

The same retention page switched to weekly cohorts across a ninety-day range.The same retention page switched to weekly cohorts across a ninety-day range.
Weekly cohorts · 90 days
Specifics

How it works, precisely

Cohort periods
Day, week or month
Input
A person-day materialised view maintained on write
Today
Included. The current day is not silently excluded from the grid
Questions

Retention: the usual questions

Does retention count anonymous visitors?

Yes, over resolved person identities. An anonymous visitor on a stable device is a person; if they later identify themselves, the merge re-attributes their earlier activity, and the cohort they belong to follows the resolution.

Run it yourself this afternoon

Clone the repository, bring up the stack with Docker Compose, paste one script tag. The data never leaves your machines.