> For the complete documentation index, see [llms.txt](https://docs.hackle.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hackle.io/en/data/example/retention-example.md).

# Retention Analysis Example

Examples of analyzing user return visits and retention rates.

These are examples of analyzing return visits, key feature usage, and repurchases with the Retention chart.

The Start Event is the baseline action for the analysis. The Goal Event is the action you count as a return visit.

### Acquisition and activation

* **How does the service return visit rate change over the last 7 days?**
  * Start Event: `Any Event`
  * Goal Event: `Any Event`
  * Query period: Last 7 days, daily
  * Identify the point where daily retention drops sharply.
* **Are users who signed up still active two weeks later?**
  * Start Event: `Sign Up`
  * Goal Event: `Any Event`
  * Query period: Last 14 days, daily
  * Check whether onboarding right after sign-up leads to long-term usage.
* **Where is the largest drop-off after sign-up?**
  * Start Event: `Sign Up`
  * Goal Event: `Any Event`
  * Query period: Last 14 days, daily
  * Compare the retention gap between consecutive periods in the cohort table.

### Key feature usage

* **Do users come back to use the key feature again?**
  * Start Event: `Any Event`
  * Goal Event: key feature events such as `Favorite`, `Send Message`, or `Follow`
  * Query period: Last 7 days, daily
  * Save a chart for each feature to compare reuse rates.
* **Do users of a specific feature return the following week?**
  * Start Event: the key feature event you want to analyze
  * Goal Event: `Any Event`
  * Query period: Last 8 weeks, weekly
  * Check whether experiencing the feature leads to long-term activation.

### Purchase and payment

* **What is the weekly repurchase rate of recent visitors?**
  * Start Event: `Any Event`
  * Goal Event: `Purchase`
  * Query period: Last 30 days, weekly
  * For services with long purchase cycles, also check Unbounded retention.
* **How does daily retention differ between all users and purchasing users?**
  * In the first chart, set both the Start Event and the Goal Event to `Any Event`.
  * In the second chart, set the Start Event to `Purchase` and the Goal Event to `Any Event`.
  * Set the query period to the last 14 days, daily, for both charts.
  * Compare the retention trends of the two charts to see the impact of the purchase experience.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hackle.io/en/data/example/retention-example.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
