DataRetentionSettings
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-01-30 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-01-30 UTC."],[[["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."]]],["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"]]