create_analytics_audience
Build a GA4 audience (remarketing list)
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
| Parameter | Type | Description |
|---|---|---|
propertyrequired | string | the NUMERIC GA4 property id |
displayNamerequired | string | the audience name shown in GA4 and in Google Ads |
descriptionrequired | string | REQUIRED by Google on the Audience resource — one line saying who is in it |
membershipDurationDaysrequired | number | REQUIRED and IMMUTABLE, 1-540. 30 is the usual remarketing window; 540 is GA4's maximum |
filterClausesrequired | object[] | 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 |
eventTrigger | object | optional {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.
Related tools
list_analytics_audiencesList the GA4 audiences on a propertyunlink_google_ads_from_analyticsUnlink Google Ads from a GA4 propertylink_google_ads_to_analyticsLink a GA4 property to a Google Ads accountlist_analytics_google_ads_linksWhich Google Ads accounts a GA4 property is linked to