AI-generated Key Takeaways
-
Data Retention Settings control how long event-level data is stored for a Google Analytics 4 property and are configured as a singleton resource.
-
You can set the retention duration for event data to 2, 14, 26, 38, or 50 months, with longer durations available for 360 properties.
-
The
resetUserDataOnNewActivity
setting determines whether the user identifier retention period resets with each new event. -
Data Retention Settings use a JSON representation and include fields for name, event data retention duration, and user data reset behavior.
Settings values for data retention. This is a singleton resource.
JSON representation |
---|
{ "name": string, "eventDataRetention": enum ( |
Fields | |
---|---|
name |
Output only. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings |
eventDataRetention |
Required. The length of time that event-level data is retained. |
userDataRetention |
Required. The length of time that user-level data is retained. |
resetUserDataOnNewActivity |
If true, reset the retention period for the user identifier with every event from that user. |
RetentionDuration
Valid values for the data retention duration.
Enums | |
---|---|
RETENTION_DURATION_UNSPECIFIED |
Data retention time duration is not specified. |
TWO_MONTHS |
The data retention time duration is 2 months. |
FOURTEEN_MONTHS |
The data retention time duration is 14 months. |
TWENTY_SIX_MONTHS |
The data retention time duration is 26 months. Available to 360 properties only. Available for event data only. |
THIRTY_EIGHT_MONTHS |
The data retention time duration is 38 months. Available to 360 properties only. Available for event data only. |
FIFTY_MONTHS |
The data retention time duration is 50 months. Available to 360 properties only. Available for event data only. |