archive_analytics_custom_metric
Archive a GA4 custom metric (one-way) destructive
Description
THE ONLY WAY TO RETIRE A GA4 CUSTOM METRIC, and it is ONE-WAY: GA4 publishes no delete and no un-archive for custom metrics anywhere in its API, exactly as for dimensions, so archiving is permanent through every programmatic surface. It frees the slot against the 50-per-property cap, and reports lose the ability to sum or average it. WITHOUT `confirm` IT ARCHIVES NOTHING and instead describes the metric read back from Google — check that against what the user asked for before confirming, because naming the RIGHT metric is the one thing confirm cannot prove. Identify it by parameterName (from list_analytics_definitions), not the report label. A custom DIMENSION of the same name is a DIFFERENT resource and needs archive_analytics_custom_dimension. Needs edit access. 0 credits.
Parameters
| Parameter | Type | Description |
|---|---|---|
propertyrequired | string | NUMERIC GA4 property id |
parameterNamerequired | string | the event parameter of the metric to archive, e.g. 'order_value' |
confirm | boolean | must be true to actually archive — without it nothing is archived and the metric is described back to you |
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/archive_analytics_custom_metric.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"archive_analytics_custom_metric","arguments":{"property":"<string>","parameterName":"<string>"}}}
CLI
hermoso call archive_analytics_custom_metric --json '{"property":"<string>","parameterName":"<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.
Related tools
list_analytics_definitionsList a GA4 property’s key events and custom dimensionsarchive_analytics_custom_dimensionArchive a GA4 custom dimensioncreate_analytics_custom_metricRegister a GA4 custom metriccheck_analytics_compatibilityCheck a GA4 report will work, before running itdelete_analytics_key_eventStop counting a GA4 event as a conversionlist_analytics_metadataWhat a GA4 property can be askedcreate_analytics_custom_dimensionCreate a GA4 custom dimensioncreate_analytics_key_eventMark a GA4 event as a key event (conversion)analytics_realtimeWho is on the site right now (GA4 realtime)analytics_reportRun a GA4 report