试用 Google Analytics 的 MCP 服务器。从
GitHub 安装,并参阅
公告了解详情。
DataRetentionSettings
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
字段 |
name |
string
仅限输出。此 DataRetentionSetting 资源的资源名称。格式:properties/{property}/dataRetentionSettings
|
eventDataRetention |
enum (RetentionDuration )
必需。事件级数据的保留期限。
|
userDataRetention |
enum (RetentionDuration )
必需。用户级数据的保留期限。
|
resetUserDataOnNewActivity |
boolean
如果为 true,则每当用户有新的事件发生,系统就会重置该用户的标识符的保留期限。
|
RetentionDuration
枚举 |
RETENTION_DURATION_UNSPECIFIED |
未指定数据保留时长。 |
TWO_MONTHS |
数据保留时长为 2 个月。 |
FOURTEEN_MONTHS |
数据保留时长为 14 个月。 |
TWENTY_SIX_MONTHS |
数据保留期限为 26 个月。仅适用于 360 媒体资源。仅适用于事件数据。 |
THIRTY_EIGHT_MONTHS |
数据保留期限为 38 个月。仅适用于 360 媒体资源。仅适用于事件数据。 |
FIFTY_MONTHS |
数据保留时长为 50 个月。仅适用于 360 媒体资源。仅适用于事件数据。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eData Retention Settings control how long event-level data is stored for a Google Analytics 4 property and are configured as a singleton resource.\u003c/p\u003e\n"],["\u003cp\u003eYou can set the retention duration for event data to 2, 14, 26, 38, or 50 months, with longer durations available for 360 properties.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eresetUserDataOnNewActivity\u003c/code\u003e setting determines whether the user identifier retention period resets with each new event.\u003c/p\u003e\n"],["\u003cp\u003eData Retention Settings use a JSON representation and include fields for name, event data retention duration, and user data reset behavior.\u003c/p\u003e\n"]]],["Data retention settings are managed through a singleton resource, defining the duration for retaining event-level and user-level data. Key actions include setting `eventDataRetention` and `userDataRetention` using enumerated values like `TWO_MONTHS`, `FOURTEEN_MONTHS`, `TWENTY_SIX_MONTHS`, `THIRTY_EIGHT_MONTHS`, or `FIFTY_MONTHS`. Another key action is the definition of the reset retention period for each new activity with `resetUserDataOnNewActivity`. The name of the resource is a string value with the format `properties/{property}/dataRetentionSettings`.\n"],null,["# DataRetentionSettings\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [RetentionDuration](#RetentionDuration)\n\nSettings values for data retention. This is a singleton resource.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"eventDataRetention\": enum (/analytics/devguides/config/admin/v1/rest/v1beta/DataRetentionSettings#RetentionDuration), \"userDataRetention\": enum (/analytics/devguides/config/admin/v1/rest/v1beta/DataRetentionSettings#RetentionDuration), \"resetUserDataOnNewActivity\": boolean } ``` |\n\n| Fields ||\n|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings |\n| `eventDataRetention` | `enum (`[RetentionDuration](/analytics/devguides/config/admin/v1/rest/v1beta/DataRetentionSettings#RetentionDuration)`)` Required. The length of time that event-level data is retained. |\n| `userDataRetention` | `enum (`[RetentionDuration](/analytics/devguides/config/admin/v1/rest/v1beta/DataRetentionSettings#RetentionDuration)`)` Required. The length of time that user-level data is retained. |\n| `resetUserDataOnNewActivity` | `boolean` If true, reset the retention period for the user identifier with every event from that user. |\n\nRetentionDuration\n-----------------\n\nValid values for the data retention duration.\n\n| Enums ||\n|----------------------------------|-----------------------------------------------------------------------------------------------------------------|\n| `RETENTION_DURATION_UNSPECIFIED` | Data retention time duration is not specified. |\n| `TWO_MONTHS` | The data retention time duration is 2 months. |\n| `FOURTEEN_MONTHS` | The data retention time duration is 14 months. |\n| `TWENTY_SIX_MONTHS` | The data retention time duration is 26 months. Available to 360 properties only. Available for event data only. |\n| `THIRTY_EIGHT_MONTHS` | The data retention time duration is 38 months. Available to 360 properties only. Available for event data only. |\n| `FIFTY_MONTHS` | The data retention time duration is 50 months. Available to 360 properties only. Available for event data only. |"]]