> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Data Retention

> Updates a Google Analytics 4 property's data retention: how long event and user data is kept (2 or 14 months; longer on GA4 360) and whether a user's retention resets on new activity

Updates a Google Analytics 4 property's data retention: how long event and user data is kept (2 or 14 months; longer on GA4 360) and whether a user's retention resets on new activity.

| | |
| - | - |
| **App** | GA4 |
| **Operation ID** | `ga4_update_data_retention` |
| **Type** | Action |
| **Connection** | `ga4` (required) |
| **Credits per run** | 1 |
| **Agent / MCP tool** | Yes |
| **Requires approval** | Yes (write operation) |

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `account` | array (also accepts a comma-separated string) | No | - | The GA4 property to change. Only one property at a time. |
| `event_data_retention` | string or SelectableOption | No | - | How long event-level data is kept for explorations: 'TWO\_MONTHS' or 'FOURTEEN\_MONTHS'. 'TWENTY\_SIX\_MONTHS', 'THIRTY\_EIGHT\_MONTHS' and 'FIFTY\_MONTHS' are only available on GA4 360 properties. |
| `user_data_retention` | string or SelectableOption | No | - | How long user-level data is kept. Same options as event\_data\_retention. |
| `reset_user_data_on_new_activity` | boolean | No | - | When true, a user's retention period restarts on each new event from that user. |

### SelectableOption

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `value` | string | Yes | - | |
| `label` | string | Yes | - | |

## Output

**Type**: `Dict`

Returns the saved retention settings.

**Fields**: `property_id`, `event_data_retention`, `user_data_retention`, `reset_user_data_on_new_activity`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.