# Hermoso: analytics_data_retention · Hermoso developer docs

> Machine-readable twin of https://hermoso.ai/docs/reference/ads/analytics_data_retention/. Generated from the shipped page. Do not edit by hand.
> Full agent guide: https://hermoso.ai/llms.txt · MCP: https://app.hermoso.ai/mcp

[Docs](https://hermoso.ai/docs/) / [Tool reference](https://hermoso.ai/docs/reference/) / [Ad campaign management](https://hermoso.ai/docs/reference/ads/) / analytics_data_retention

# `analytics_data_retention`

GA4 data retention destructive

Area: GA4 REPORTING ANNOTATIONS + DATA RETENTION · [Ad campaign management](https://hermoso.ai/docs/reference/ads/). Generated from the running MCP server, like the rest of the [tool reference](https://hermoso.ai/docs/reference/).

## Description

HOW LONG GA4 KEEPS EVENT- AND USER-LEVEL DATA. The default is 2 months, which silently caps every exploration and funnel at the last two months; standard reports are unaffected. action:'get' reads it; 'set' changes eventDataRetention / userDataRetention (2 or 14 months on a standard property; 26, 38, 50 for event data on Analytics 360 only) and resetUserDataOnNewActivity. RAISING applies to data already collected. LOWERING DELETES the older data at Google's next monthly run and cannot be undone, so it answers needsConfirm first — show the user, get a yes, then confirm:true. Read back. Free.

## Parameters

Parameter Type Description

`property` required `string` NUMERIC GA4 property id, from list_analytics_properties

`action` `"get" | "set"` defaults to 'get'

`eventDataRetention` `string` months: 2 or 14 (26/38/50 Analytics 360 only), or the enum e.g. FOURTEEN_MONTHS

`userDataRetention` `string` months: 2 or 14

`resetUserDataOnNewActivity` `boolean` true = a user's data retention window restarts each time that user shows new activity

`confirm` `boolean` required when the change SHORTENS retention, which deletes data

## Example call

Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and `POST https://app.hermoso.ai/v1/tools/analytics_data_retention`.

**MCP** (`tools/call`)

`{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analytics_data_retention","arguments":{"property":"<string>"}}}`
**CLI**

`hermoso call analytics_data_retention --json '{"property":"<string>"}'`

## Credits

Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See [Credits & costs](https://hermoso.ai/docs/credits/).

## Related tools

- [manage_analytics_annotations](https://hermoso.ai/docs/reference/ads/manage_analytics_annotations/) GA4 chart annotations

[All 759 Ad campaign management tools](https://hermoso.ai/docs/reference/ads/) · [tools.json](https://hermoso.ai/docs/reference/tools.json)
