hermosodocs

create_analytics_audience

Build a GA4 audience (remarketing list)

Area: GA4 <-> GOOGLE ADS: THE LINK, AND THE AUDIENCES THAT TRAVEL… · Ad campaign management. Generated from the running MCP server, like the rest of the tool reference.

Description

BUILD A GA4 AUDIENCE — a remarketing list defined by what people did on the site, which flows into Google Ads across the property's Google Ads link. TELL THE USER TWO THINGS BEFORE CALLING: GA4 marks the DEFINITION, the MEMBERSHIP DURATION and every filter SCOPE immutable, so a wrong audience is archived and rebuilt rather than edited; and it is NOT retroactive — it starts collecting members from creation onward, and Google takes 24-48 hours to populate it. `filterClauses` is GA4's own nested shape and the TOP level of each filterExpression MUST be a single `andGroup` (Google's schema says so and its rejection names no field). Worked example, 'everyone who fired purchase': [{"clauseType":"INCLUDE","simpleFilter":{"scope":"AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS","filterExpression":{"andGroup":{"filterExpressions":[{"orGroup":{"filterExpressions":[{"eventFilter":{"eventName":"purchase"}}]}}]}}}}]. The result says whether the property is linked to Google Ads, because an audience nobody can remarket to is not a finished job. 0 credits.

Parameters

ParameterTypeDescription
propertyrequiredstringthe NUMERIC GA4 property id
displayNamerequiredstringthe audience name shown in GA4 and in Google Ads
descriptionrequiredstringREQUIRED by Google on the Audience resource — one line saying who is in it
membershipDurationDaysrequirednumberREQUIRED and IMMUTABLE, 1-540. 30 is the usual remarketing window; 540 is GA4's maximum
filterClausesrequiredobject[]GA4 AudienceFilterClause list — each {clauseType:INCLUDE|EXCLUDE, simpleFilter|sequenceFilter}. See the worked example in the description
exclusionDurationMode"EXCLUDE_TEMPORARILY" | "EXCLUDE_PERMANENTLY"IMMUTABLE, and it applies to EVERY exclude clause on the audience
eventTriggerobjectoptional {eventName, logCondition} event GA4 logs when a user joins the audience

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

MCP (tools/call)

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_analytics_audience","arguments":{"property":"<string>","displayName":"<string>","description":"<string>","membershipDurationDays":"<number>","filterClauses":"<array>"}}}

CLI

hermoso call create_analytics_audience --json '{"property":"<string>","displayName":"<string>","description":"<string>","membershipDurationDays":"<number>","filterClauses":"<array>"}'

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