> ## 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.

# Retention

> Measure how many people come back with weekly or daily cohort retention, including D1, D7 and D30. Choose the entry and returning events, recurring or rolling retention, and the people.

Retention shows how many people come back to your product over time. Use it to measure stickiness, compare cohorts and spot churn.

## What is a cohort retention chart?

A **cohort** is the group of people whose first entry event (by default, any page view or custom event) fell in the same week (or day). Retention is the share of each cohort that is active again in later periods. A week starts on Monday and ends on Sunday, in UTC, as in the date picker. The date of a weekly cohort is the Monday of its week.

| Cohort | People | Week 0 | Week 1 | Week 2 | Week 3 |
| - | - | - | - | - | - |
| Week of Sep 1 | 1,000 | 100% | 40% | 25% | 20% |

In this example, 40% of the people who started in the week of Sep 1 came back in the next week.

## Create a retention chart

Retention is a chart type on a [dashboard](https://docs.manalens.dev/features/dashboards.md).

1. Open **Dashboards** and open or create a dashboard.
2. Click **Add chart** and choose the **Retention** metric.
3. Choose the **Entry event**. It defines the cohort: people are grouped by the period of their first entry event. Choose **Any event** (default), **Any page view**, a **Page** path such as `/play`, or a custom **Event** such as `tutorial_completed`.
4. Choose the **Returning event**. A user is retained in a period when they do this event in it. The choices are the same as for the entry event.
5. Choose the **Retention type**:
   * **Rolling** (default for new charts): a user counts in period N when they return in period N or in any later period. The curve can only go down.
   * **Recurring**: a user counts in period N only when they return in exactly that period. The curve can go down and come back up.
6. Choose the **Period**:
   * **Weekly** (default): weeks 0 to 12.
   * **Daily**: days 0 to 30, which includes D1, D7 and D30.
7. Optional: choose a saved [segment](https://docs.manalens.dev/features/filters-segments.md) in **Users** to count only those people.
8. Click **Save chart**.

Rolling retention is always the same as or higher than recurring retention, because it counts everyone that recurring retention counts, plus people who came back later. Charts saved before these settings existed use recurring retention with any event.

## How retention is counted

* A user is the explicit `user_id`, else the one user that the visitor's anonymous ID links to, else the anonymous ID. So a user who signs in on a later visit stays in the same cohort. See [core concepts](https://docs.manalens.dev/data/concepts.md#people-and-identity-links).
* A user enters a cohort with their **first entry event**. With **Any event**, this is their first observed page view or custom event. `identify` events do not count as activity.
* A user is retained in a period when they do the **returning event** in it (recurring), or in it or a later period (rolling).
* Period 0 is always 100%: every user in the cohort entered in period 0, even when the returning event is different from the entry event.
* Dashboard filters and the segment keep only people with a matching event in the date range.
* Periods that are not complete at the end of the date range show a dash, not a low number.
* Bots and events sent before consent (no visitor ID) are excluded.

## Read the chart

* **Compare rows** to see whether newer cohorts retain better than older ones after a product change.
* **Read columns** to see where people stop coming back. A large drop between Week 0 and Week 1 often points to onboarding.
* **Look for a flat tail.** When the curve flattens, you have found the people who stay.

> [!TIP]
>
> Hover a cell to see the exact number of people retained.


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