hermosodocs

manage_analytics_measurement_protocol_secret

GA4 Measurement Protocol secrets destructive

Area: GA4 WEB-STREAM SETUP · Ad campaign management. Generated from the running MCP server, like the rest of the tool reference.

Description

THE SERVER-SIDE EVENT CHANNEL FOR GA4, the Google twin of the conversions APIs Hermoso already ships for Reddit, Snapchat and OpenAI Ads. A Measurement Protocol secret is the api_secret half of https://www.google-analytics.com/mp/collect; the other half is the stream's measurementId for a web stream or its firebaseAppId for an app stream, and this tool reports whichever applies. action:"list" shows every secret with its value, action:"create" mints one (displayName is required, and it is the ONLY label a secret ever gets because the values are opaque), action:"delete" revokes one and NEEDS confirm:true. TELL THE USER THIS BEFORE THEY DELETE: there is no rotation anywhere in the API, because the value is output-only and patch reaches only the display name. A delete takes effect at once, and anything still sending with the old value stops being recorded SILENTLY, since the Measurement Protocol answers a bad api_secret with a 2xx and drops the hit. Rotating safely means create the new one, move every sender across, then delete the old one. Free.

Parameters

ParameterTypeDescription
propertyrequiredstringNUMERIC GA4 property id
action"list" | "create" | "delete"defaults to 'list'
dataStreamstringstream id, measurement id or display name. Optional when the property has exactly one stream; required when it has several, and an ambiguous name is refused rather than first-matched
displayNamestringREQUIRED for action:'create' — what will be sending with this secret, e.g. "Shopify webhook". It is the only label a secret ever gets. May also be used to name one for delete
secretIdstringfor action:'delete', from action:'list' — preferred over displayName because it is unambiguous
confirmbooleanmust be true to actually delete

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/manage_analytics_measurement_protocol_secret.

MCP (tools/call)

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

CLI

hermoso call manage_analytics_measurement_protocol_secret --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.

All 759 Ad campaign management tools · tools.json