Hãy thử máy chủ MCP cho Google Analytics. Cài đặt từ
GitHub và xem
thông báo để biết thêm thông tin chi tiết.
DataRetentionSettings
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Giá trị cài đặt cho việc giữ lại dữ liệu. Đây là tài nguyên singleton.
Biểu diễn dưới dạng JSON |
{
"name": string,
"eventDataRetention": enum (RetentionDuration ),
"userDataRetention": enum (RetentionDuration ),
"resetUserDataOnNewActivity": boolean
} |
Trường |
name |
string
Chỉ có đầu ra. Tên tài nguyên cho tài nguyên DataRetentionSetting này. Định dạng: properties/{property}/dataRetentionSettings
|
eventDataRetention |
enum (RetentionDuration )
Bắt buộc. Thời lượng lưu giữ dữ liệu ở cấp sự kiện.
|
userDataRetention |
enum (RetentionDuration )
Bắt buộc. Khoảng thời gian giữ lại dữ liệu cấp người dùng.
|
resetUserDataOnNewActivity |
boolean
Nếu đúng, hãy đặt lại khoảng thời gian lưu giữ cho giá trị nhận dạng người dùng đối với mọi sự kiện của người dùng đó.
|
RetentionDuration
Các giá trị hợp lệ cho thời lượng giữ lại dữ liệu.
Enum |
RETENTION_DURATION_UNSPECIFIED |
Bạn chưa chỉ định thời lượng giữ lại dữ liệu. |
TWO_MONTHS |
Thời gian lưu giữ dữ liệu là 2 tháng. |
FOURTEEN_MONTHS |
Thời gian lưu giữ dữ liệu là 14 tháng. |
TWENTY_SIX_MONTHS |
Thời gian giữ lại dữ liệu là 26 tháng. Chỉ dành cho các tài sản 360. Chỉ dành cho dữ liệu sự kiện. |
THIRTY_EIGHT_MONTHS |
Thời gian lưu giữ dữ liệu là 38 tháng. Chỉ dành cho các tài sản 360. Chỉ dành cho dữ liệu sự kiện. |
FIFTY_MONTHS |
Thời gian lưu giữ dữ liệu là 50 tháng. Chỉ dành cho các tài sản 360. Chỉ dành cho dữ liệu sự kiện. |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-26 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["\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. |"]]