# Data retention

Also called: data retention period, retention policy, GA4 data retention, storage limitation

Data retention is how long a system keeps data before deleting it, and a data retention period is the limit you set for that. In analytics it decides how far back you can compare traffic, and under privacy laws such as the GDPR personal data may be kept no longer than its purpose needs.

## How it is calculated

A retention period is a fixed length counted back from today. A scheduled job deletes everything older than the cut-off, often rounded to the start of a day or month so you never hold less than the stated period. Pick it from the longest comparison you need: a year-over-year report needs at least 13 months, a two-year trend at least 25.

In Google Analytics 4 the setting means something narrower than it sounds. Google's [help page](https://support.google.com/analytics/answer/7667196) says standard properties can keep user-level and event-level data for 2 or 14 months (360 properties can keep event data for 26, 38 or 50 months), and that the setting affects only explorations and funnel reports. Standard aggregated reports are not affected. The GDPR's storage limitation principle, in Article 5(1)(e), is the legal reason to keep the period short when the data is personal.

```
deletion cut-off = start of (current month − retention months)
```

## Example

A site keeps 6 months of data and cut-offs align to the first of a month. On 16 November, the cut-off is 1 May, so everything from 1 May to today is kept: the full 6 months plus the 16 days of November. A year-over-year comparison for November is not possible, because last November is gone. With 24 months, November last year and the year before are both there.

## Common mistakes

- Reading GA4's 14-month setting as a limit on all reports. It limits explorations and funnels; standard reports keep their aggregates.
- Choosing the longest period by default. Under the GDPR, keeping personal data longer than you need is itself a breach of the storage limitation principle.
- Forgetting backups and exports. Data copied to a spreadsheet or warehouse keeps its own retention, whatever the tool deletes.

## How CrispStats shows it

In CrispStats, traffic data is kept for the plan's period: 24 months on Starter, 60 months on Growth, and kept while subscribed on Scale. The period applies to every report, not only some. A daily job removes expired data, with cut-offs at the start of a UTC month. Revenue history is kept on every plan. Because no IP addresses, raw user agents or cookies are stored, what is kept is lighter on personal data to begin with.

## Related terms

- [GDPR](/glossary/gdpr)
- [Personally identifiable information](/glossary/personally-identifiable-information)
- [IP anonymization](/glossary/ip-anonymization)
- [Cookie consent](/glossary/cookie-consent)
- [Cookieless tracking](/glossary/cookieless-tracking)
