Draft an Analytics audience
draft_ga4_audienceCreate, rename, or archive a GA4 audience and preview changes before applying them; use it to build remarketing lists for site visitors, buyers, or non-buyers.
Instructions
Draft creating, renaming or archiving a GA4 audience — returns a PREVIEW.
An audience is the users who sent certain events, viewed certain pages, or did a sequence of both in order. A linked Google Ads account receives it as a remarketing list within one to two days, to attach to campaigns with draft_audience_attachment: this is how to build a list of site visitors, of buyers, of visitors who did not buy, or of people who saw the pricing page without signing up. GA4 fixes the conditions and the membership duration at creation; afterwards only the name and description can change, and archiving is permanent (it needs a double confirmation). The draft refuses a taken name and a full property, and the preview warns when the property's audiences would not reach Google Ads (see list_ga4_audiences). Nothing changes until confirm_and_apply applies the plan_id.
Google Analytics Data API: https://developers.google.com/analytics/devguides/reporting/data/v1 and Admin API: https://developers.google.com/analytics/devguides/config/admin/v1
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "draft_ga4_audience"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | "create" (default), "update" (name and description only) or "archive". | create |
| audience | No | For update and archive: the audience's display name or resource name from list_ga4_audiences. | |
| sequence | No | Create only, instead of include_events / include_pages. 2 to 10 steps the user must do in this order. Each is an event name ("begin_checkout") or an object: {"event": "..."} or {"page": "/pricing"}, optionally with "directly_followed": true (no other event in between) and "within_minutes": 30 (after the step before). Exclusions can be added as usual. | |
| description | No | Optional for create (one is written from the events); the new description for update. | |
| property_id | No | GA4 property as "properties/123456789" or the bare numeric ID. If empty, uses the default from config. | |
| display_name | No | Name of the audience; required for create, the new name for update. | |
| exclude_pages | No | Create only. Users who viewed such a page are kept out, e.g. ["/thank-you"]. | |
| include_pages | No | Create only. Users who viewed a page whose full URL contains ANY of these texts join, e.g. ["/pricing"] (also matches /pricing/enterprise and /en/pricing). Not case sensitive. | |
| exclude_events | No | Create only. Users who sent any of these are kept out, e.g. include ["session_start"] and exclude ["purchase"] for visitors who did not buy. | |
| include_events | No | Create only. Users who sent ANY of these events join, e.g. ["session_start"] for every visitor, ["purchase"] for buyers, ["sign_up", "generate_lead"] for leads. Together with include_pages it is still "any of". | |
| exclude_permanently | No | Create only. True keeps users out for good once they sent an excluded event; False (default) only while they keep meeting the exclusion within the membership window. | |
| membership_duration_days | No | Create only. Days a user stays after last meeting the conditions, 1 to 540 (default 30). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||