---
title: Retention Widget
description: >-
  Analyze user retention and engagement patterns over time using cohort analysis
  visualization.
breadcrumbs: Docs > Dashboards > Widgets > Retention Widget
---

# Retention Widget

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com



{% alert level="danger" %}
The Retention widget is not available in the [Datadog site](https://docs.datadoghq.com/getting_started/site) ().
{% /alert %}


{% /callout %}

{% callout %}
The Retention widget is available in Preview for Product Analytics customers. To request access, complete the form.

[Request Access](https://www.datadoghq.com/product-preview/product-analytics/)
{% /callout %}

{% image
   source="https://datadog-docs.imgix.net/images/dashboards/widgets/retention/retention_widget_graph.7a0dcf01833bf86982b5e5f122986857.png?auto=format"
   alt="Graph visualization of the retention widget" /%}

Retention Analysis allows you to measure how often users are successfully returning to a page or performing an action. By tracking user retention over time, you can gain insights into overall user satisfaction. Use Retention Analysis to answer questions like the following:

- After visiting the checkout page and purchasing one item, what percentage of people come back and continue to do that in the following weeks?
- During the holiday season, how many people look at the catalog page once and never return?
- On a ride share app, how many people open up the app and then order a ride?

{% image
   source="https://datadog-docs.imgix.net/images/dashboards/widgets/retention/retention_widget_config.c38cb7457ddfc87d65e6f8cbd169e920.png?auto=format"
   alt="Configuration options for retention widget" /%}

## Setup{% #setup %}

To populate user retention data, you must set the `usr.id` attribute in your SDK. [See the instructions for sending unique user attributes](https://docs.datadoghq.com/real_user_monitoring/application_monitoring/browser/advanced_configuration#user-session).

### Configuration{% #configuration %}

1. Define the initial event by selecting **View** or **Action** and choose a query from the dropdown menu.
1. (Optional) Click **+ Add different return step** to configure a different return event from the original event.
1. Define users by selecting from users or segments in the dropdown.
1. Customize the chart to display either as a percentage or total number, and to measure by days, weeks, or months.

### Options{% #options %}

#### Global time{% #global-time %}

On screenboards and notebooks, choose whether your widget has a custom timeframe or uses the global timeframe.

## Further Reading{% #further-reading %}

- [Retention Analysis](https://docs.datadoghq.com/product_analytics/charts/retention_analysis/)
- [Measure long-term user engagement with Datadog Retention Analysis](https://www.datadoghq.com/blog/user-engagement-retention-analysis/)
