Draft an Analytics data retention change
draft_ga4_data_retentionDraft a change to how long GA4 keeps event- and user-level data, returning a PREVIEW.
GA4 defaults to 2 months, which cuts explorations, funnels and other user-level reports short; standard properties allow 14 months, GA4 360 up to 50. Standard reports are aggregated and not affected. Lengthening applies from now on (data already deleted does not come back); shortening deletes older data for good and needs a double confirmation. The preview shows before and after and reminds the user that a privacy policy naming a retention period must match. NO_CHANGE when the settings already match. Nothing changes until confirm_and_apply applies it; the dry run re-reads the settings and refuses if they changed in GA4 after the preview.
Google Analytics Data API: https://developers.google.com/analytics/devguides/reporting/data/v1 and Admin API: https://developers.google.com/analytics/devguides/config/admin/v1
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "draft_ga4_data_retention"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| property_id | No | Numeric GA4 property ID, with or without the "properties/" prefix. If empty, uses the default from config. | |
| user_data_retention | No | Months to keep user-level data, same values. Empty leaves it. | |
| event_data_retention | No | Months to keep event-level data: 2, 14, 26, 38 or 50 (or TWO_MONTHS, FOURTEEN_MONTHS, ...). Empty leaves it. | |
| reset_user_data_on_new_activity | No | True restarts a user's retention period with each new event from that user. Empty leaves it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||