試用 Google Analytics 的 MCP 伺服器。從
GitHub 安裝,詳情請參閱
公告。
DataRetentionSettings
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
欄位 |
name |
string
僅供輸出。這個 DataRetentionSetting 資源的資源名稱。格式:properties/{property}/dataRetentionSettings
|
eventDataRetention |
enum (RetentionDuration )
必要欄位。事件層級資料的保留時間長度。
|
userDataRetention |
enum (RetentionDuration )
必要欄位。保留使用者層級資料的時間長度。
|
resetUserDataOnNewActivity |
boolean
如果設為 true,每當使用者產生新事件時,該事件的使用者 ID 保留期限都會重設。
|
RetentionDuration
列舉 |
RETENTION_DURATION_UNSPECIFIED |
未指定資料保留時間長度。 |
TWO_MONTHS |
資料保留時間為 2 個月。 |
FOURTEEN_MONTHS |
資料保留時間為 14 個月。 |
TWENTY_SIX_MONTHS |
資料保留時間為 26 個月。僅適用於 360 資源。僅適用於事件資料。 |
THIRTY_EIGHT_MONTHS |
資料保留時間為 38 個月。僅適用於 360 資源。僅適用於事件資料。 |
FIFTY_MONTHS |
資料保留時間為 50 個月。僅適用於 360 資源。僅適用於事件資料。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eData Retention Settings control how long Google Analytics 4 properties retain event-level data and offer options ranging from 2 to 50 months.\u003c/p\u003e\n"],["\u003cp\u003eThese settings include the ability to reset user data retention periods with each new event.\u003c/p\u003e\n"],["\u003cp\u003eThis is a singleton resource, meaning there's only one Data Retention Settings configuration per Google Analytics 4 property.\u003c/p\u003e\n"],["\u003cp\u003e360 properties have access to extended retention durations of 26, 38, and 50 months.\u003c/p\u003e\n"]]],["Data retention settings are defined using a JSON structure. Key settings include `eventDataRetention` and `userDataRetention`, which specify the duration for retaining event-level and user-level data, respectively, using predefined enum values (like `TWO_MONTHS` or `FOURTEEN_MONTHS`). An additional setting, `resetUserDataOnNewActivity`, determines if the retention period resets with each new user event. 360 properties have access to extended periods like 26, 38 or 50 months for event data.\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/v1alpha/DataRetentionSettings#RetentionDuration), \"userDataRetention\": enum (/analytics/devguides/config/admin/v1/rest/v1alpha/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/v1alpha/DataRetentionSettings#RetentionDuration)`)` Required. The length of time that event-level data is retained. |\n| `userDataRetention` | `enum (`[RetentionDuration](/analytics/devguides/config/admin/v1/rest/v1alpha/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. |"]]