Wypróbuj serwer MCP w Google Analytics. Zainstaluj go z
GitHub. Więcej informacji znajdziesz w
ogłoszeniu.
DataRetentionSettings
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
wartości ustawień przechowywania danych, To zasób pojedynczy.
Pola |
name |
string
Tylko dane wyjściowe. Nazwa zasobu DataRetentionSetting. Format: usługi/{usługa}/ustawienia przechowywania danych
|
eventDataRetention |
enum (RetentionDuration )
Wymagane. Czas przechowywania danych na poziomie zdarzenia.
|
userDataRetention |
enum (RetentionDuration )
Wymagane. Czas przechowywania danych na poziomie użytkownika.
|
resetUserDataOnNewActivity |
boolean
Jeśli to pole ma wartość prawda, okres przechowywania identyfikatora użytkownika jest resetowany przy każdym zdarzeniu pochodzącym od tego użytkownika.
|
RetentionDuration
Prawidłowe wartości okresu przechowywania danych.
Wartości w polu enum |
RETENTION_DURATION_UNSPECIFIED |
Czas przechowywania danych nie jest określony. |
TWO_MONTHS |
Czas przechowywania danych wynosi 2 miesiące. |
FOURTEEN_MONTHS |
Czas przechowywania danych wynosi 14 miesięcy. |
TWENTY_SIX_MONTHS |
Czas przechowywania danych wynosi 26 miesięcy. Dostępne tylko w usługach w Analytics 360. Dostępne tylko w przypadku danych zdarzeń. |
THIRTY_EIGHT_MONTHS |
Czas przechowywania danych wynosi 38 miesięcy. Dostępne tylko w usługach w Analytics 360. Dostępne tylko w przypadku danych zdarzeń. |
FIFTY_MONTHS |
Okres przechowywania danych wynosi 50 miesięcy. Dostępne tylko w usługach w Analytics 360. Dostępne tylko w przypadku danych zdarzeń. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 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. |"]]