Google Analytics: Run Funnel Report
ga4_run_funnel_reportRun a Google Analytics funnel report on one GA4 property of the user's connected Google Analytics login: an ordered list of steps (events, page conditions or parameter conditions) and how many users completed each one and dropped off between them, optionally broken down by a dimension (device, country) and with the next action users take after a step. Returns the funnel table and, when present, the visualization table, each as one object per row keyed by Google's dimension and metric names. Read-only; uses the Data API alpha surface.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"property_id": "<property_id>",
"funnel_steps": "<funnel_steps>"
},
"name": "ga4_run_funnel_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| segments | No | Optional Data API Segment objects applied to the funnel; see https://developers.google.com/analytics/devguides/reporting/data/v1/funnels#segments. | |
| date_ranges | No | Date ranges to report on, each {startDate, endDate, name?}. Dates are YYYY-MM-DD or relative: today, yesterday, NdaysAgo. Examples: a single month [{"startDate":"2025-01-01","endDate":"2025-01-31","name":"Jan2025"}]; the previous 30 days [{"startDate":"30daysAgo","endDate":"yesterday"}]; two ranges to compare [{"startDate":"2025-01-01","endDate":"2025-01-31"},{"startDate":"2025-02-01","endDate":"2025-02-28"}]. | |
| property_id | Yes | The GA4 property: its number (123456789) or properties/123456789. Must be one of the properties ga4_get_account_summaries lists for the connected login. | |
| funnel_steps | Yes | Ordered funnel steps. Each is {name, event} for a single event ({"name":"Session start","event":"session_start"}) or {name, filterExpression} for anything else. Examples: several events {"name":"Purchase","filterExpression":{"orGroup":{"expressions":[{"funnelEventFilter":{"eventName":"purchase"}},{"funnelEventFilter":{"eventName":"in_app_purchase"}}]}}}; a dimension condition {"name":"Organic visitors","filterExpression":{"funnelFieldFilter":{"fieldName":"firstUserMedium","stringFilter":{"matchType":"CONTAINS","caseSensitive":false,"value":"organic"}}}}; an event with a parameter condition {"name":"Add to cart over 50","filterExpression":{"funnelEventFilter":{"eventName":"add_to_cart","funnelParameterFilterExpression":{"funnelParameterFilter":{"eventParameterName":"value","numericFilter":{"operation":"GREATER_THAN","value":{"doubleValue":50}}}}}}}; event AND page {"name":"Home page view","filterExpression":{"andGroup":{"expressions":[{"funnelEventFilter":{"eventName":"page_view"}},{"funnelFieldFilter":{"fieldName":"pageLocation","stringFilter":{"matchType":"CONTAINS","value":"/"}}}]}}}. A typical e-commerce funnel: first_open/first_visit → session_start → page_view → add_to_cart → purchase. | |
| funnel_breakdown | No | Splits each step by a dimension: {"breakdownDimension":"deviceCategory"}. Common: deviceCategory, country, operatingSystem, browser. | |
| funnel_next_action | No | What users do after a step: {"nextActionDimension":"eventName","limit":5}. Common dimensions: eventName, pagePath. | |
| return_property_quota | No | True to include the property's remaining Data API quota in the reply. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| property | Yes | properties/<number>. | |
| stepCount | Yes | Steps in the funnel as sent. | |
| funnelTable | No | The funnel table, flattened like a report, or null. | |
| propertyQuota | No | Remaining quota when return_property_quota was true, else null. | |
| funnelVisualization | No | The visualization table, flattened like a report, or null. |