Sub topic 11
Setting event data retention
Event data retention controls how long GA4 keeps user-level and event-level data before it deletes it. A new property starts with a short period, so changing it is one of the first settings to review. This chapter assumes you have already created a property and a web data stream. It also assumes you have at least the Editor role on the property.
What the setting controls
GA4 stores two kinds of data. Aggregated data is the summarized numbers behind the standard reports, such as sessions by channel or views by page. Granular data is the user-level and event-level records tied to identifiers such as cookies, User-ID values, and advertising identifiers.
Event data retention applies only to granular data. It sets how long GA4 keeps that data before deleting it.
| Affected by retention | Not affected by retention |
|---|---|
| Explorations, such as free-form, funnel, path, and user explorer | Standard reports in the Reports section, which use aggregated data |
| Segments and audiences that need user-level history | Data you already exported to BigQuery |
| Queries that combine user-scoped dimensions with a date range | Aggregated data in the Data API for standard dimensions and metrics |
The effect is easiest to see in Explorations. Suppose retention is 2 months and you build a funnel exploration with a date range of the last 12 months. Only the most recent 2 months return data. The standard acquisition report for the same 12 months still shows full numbers.
Available retention periods
The choices depend on the property type.
| Property type | Available periods | Default for new properties |
|---|---|---|
| Standard (free) GA4 | 2 months, 14 months | 2 months |
| Analytics 360 | 2, 14, 26, 38, or 50 months | 2 months |
Most teams on standard properties should choose 14 months. The 2-month default is the shortest option. If you leave it, you lose the ability to run Explorations over any longer window.
The reset-on-new-activity toggle
Below the period selector is a toggle called Reset user data on new activity. It is on by default.
- When it is on, the retention clock for a user restarts each time that user returns and a new event is recorded. A user who visits every month keeps their history alive, and a user who never returns is deleted once the period ends.
- When it is off, GA4 deletes each user's data a fixed period after it was collected. Returning users do not extend that period.
Leave the toggle on when you want longer-lived history for engaged users, such as for audience building. Turn it off when your privacy policy promises a hard cap on how long any event is kept.
How to change the setting
- Open Admin (the gear icon at the bottom left).
- In the Property column, select Data collection and modification, then Data retention.
- Under Event data retention, choose a period from the dropdown.
- Decide whether Reset user data on new activity should stay on.
- Select Save.
The property-level Editor role is required. Users with only Viewer, Analyst, or Marketer roles can see the page but cannot change it. Roles are covered in the previous chapter.
Changing the setting through the Admin API
You can read and update the same setting with the Google Analytics Admin API. This helps when you set up many properties and want the same retention on each. The method sits in the v1alpha version of the API, so check the current reference before you rely on it in automation.
# Requires a valid OAuth 2.0 access token with the analytics.edit scope.
# Set PROPERTY_ID to your numeric property ID, for example 123456789.
export PROPERTY_ID="123456789"
export ACCESS_TOKEN="$(gcloud auth print-access-token \
--scopes=https://www.googleapis.com/auth/analytics.edit)"
curl -X PATCH \
"https://analyticsadmin.googleapis.com/v1alpha/properties/${PROPERTY_ID}/dataRetentionSettings?updateMask=eventDataRetention,resetUserDataOnNewEvent" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"eventDataRetention": "FOURTEEN_MONTHS",
"resetUserDataOnNewEvent": true
}'The updateMask query parameter lists which fields to change. Fields not named in the mask are left alone. A successful call returns the updated settings object. A GET request to the same path, without a body or mask, reads the current values.
How the data flows
The diagram shows where retention applies. Collected events feed two stores. The aggregated store is unaffected by the retention period. The granular store is trimmed by it.
Choosing a period
Pick the period by asking what questions you must answer and what you are allowed to keep.
- Analysis needs. If you compare year over year in Explorations, or build funnels that span a long customer journey, 14 months is the minimum that makes sense. For a typical standard property, 14 months is the best default.
- Privacy commitments. If your privacy notice states a shorter retention, match it. Setting 2 months and turning off the reset toggle gives the tightest cap available in standard properties.
- Legal advice. Regulations such as the GDPR ask you to keep personal data no longer than needed. The retention setting is one control, not a compliance program. Ask your privacy lead or counsel which period fits.
- Long-term history. If you need granular data beyond 14 months on a standard property, link BigQuery and export events. The export is not trimmed by the GA4 retention setting. You then own its storage, cost, and deletion policy.
Edge cases and common errors
The change is not retroactive for data already deleted
If the property ran for six months at 2 months retention, the older granular data is already gone. Switching to 14 months now does not bring it back. It only stops further deletion from the point you save. This is the main reason to set the period when you create the property, not later.
Deletion is not instant
Shortening the period, for example from 14 months to 2 months, causes GA4 to delete the older granular data. That deletion runs on Google's schedule, not at the moment you click Save. Do not treat the change as an immediate erasure when you answer a deletion request. Use the user deletion tools for individual requests.
Empty explorations after a long date range
A common support question is that an exploration shows zeros or a sudden drop for earlier months while standard reports look normal. The cause is almost always retention. Check the period before you suspect the tag.
Data thresholds and sampling are separate
Retention does not cause data thresholds, which hide small user counts when Google signals or demographics are involved. It also does not cause sampling, which occurs on large queries. Do not diagnose them as retention problems.
The setting is per property
Each property has its own retention setting. If you follow the multi-property structure from the planning chapter, such as a production property and a test property, set each one on purpose. Test properties can safely stay at 2 months.
Verifying the setting
- Go back to Admin > Data collection and modification > Data retention and confirm the saved value.
- Open Explore, create a blank free-form exploration, and set the date range to the maximum. Check whether data appears at the oldest end of the window you expect.
- Compare a standard report for the same range. If the standard report has data and the exploration does not, retention is the limit.
For a new property there is no history yet, so this check only becomes meaningful after a few months. Record the setting and the date you chose it in your measurement plan so that the explanation is available when someone asks later.
Exercise
Your property uses the default retention. A colleague builds a funnel exploration over the last 6 months and sees data only for the last 2 months, while the standard Pages and screens report shows all 6 months. What explains this, and what do you change to prevent it from happening again for future data?
Show answer
The default event data retention of 2 months deletes granular data older than 2 months, and explorations depend on that granular data. Standard reports use aggregated data, which retention does not trim. Open Admin > Data collection and modification > Data retention and set Event data retention to 14 months. The change keeps future data longer but does not restore the data already deleted.
Exercise
Your privacy notice says that no individual event is kept for more than 14 months, even for users who keep returning. Which two settings do you choose on a standard property?
Show answer
Set Event data retention to 14 months and turn off Reset user data on new activity. With the toggle off, each event is deleted a fixed 14 months after collection. With it on, a returning user's data would be kept longer than 14 months.