Analytics funnel report
run_ga4_funnelRun a GA4 funnel report: how many users go from one step to the next, and where they drop off.
Steps are event names or pages, in order. Returns per step the users, completion rate to the next step, abandonments and abandonment rate, plus how many started and finished, the overall completion rate and the biggest drop (after which step most users leave). With breakdown, the same per value of a dimension (e.g. deviceCategory); with next_action, the most common next event or page after each step, i.e. what users do instead. Uses the GA4 Data API v1alpha (runFunnelReport), the endpoint behind GA4's funnel explorations; data reaches back as far as the property's data retention.
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": "run_ga4_funnel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | 2 to 10 steps. Each is an event name ("add_to_cart") or an object: {"event": "purchase", "name": "Bought"}, {"page": "/checkout"} (page views whose URL contains the text), optional "directly_followed": true (no other event in between) and "within_minutes": 30 (must follow the previous step within that time). | |
| breakdown | No | Dimension to split every step by, e.g. deviceCategory, sessionDefaultChannelGroup, country. | |
| next_action | No | Dimension for "what came next" after each step, e.g. eventName or pagePath. | |
| open_funnel | No | False (default) counts only users who start at step 1; true lets users enter at any step. | |
| property_id | No | GA4 property as "properties/123456789" or the bare numeric ID. If empty, uses the default from config. | |
| date_range_end | No | Same formats. | today |
| breakdown_limit | No | How many values of the breakdown dimension (1-15). | |
| date_range_start | No | "today", "yesterday", "NdaysAgo" or "YYYY-MM-DD". | 28daysAgo |
| dimension_filter | No | Only count users matching these conditions, same format as in run_ga4_report, e.g. [{"field": "deviceCategory", "value": "mobile"}]. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||