Funnel conversion
get_funnelCompute a funnel: each step counts visitors who reached it after the step before. Pass steps like ["page:/pricing", "goal:signup", "goal:checkout"] ("page:blog" = any page that contains blog, "page:/docs*" = any page that starts with /docs; a bare name is a goal; "not:upgrade" = a "did not complete" step: people who did not do the goal before the next step, never the first step), or name a funnel saved in the dashboard or in analytics.yaml. With neither, all saved funnels are computed. The result names the weakest step. revenue is the payments made after people reached a step (last touch); revenue_stopped_here is the part from people whose last step it is.
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": "get_funnel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last day, inclusive (YYYY-MM-DD). | |
| from | No | First day (YYYY-MM-DD, site time zone). Use with to instead of period. | |
| name | No | Name of a saved or planned funnel. | |
| site | No | Site domain (example.com), id or public id (tb_…). Optional with a site key, or when the account has one site. | |
| steps | No | 2 to 8 steps: page:/path, page:*text*, page:/prefix*, goal:name or not:goal_name (did not complete; not the first step). | |
| period | No | Time range. Default 30d. today, yesterday, 24h, 7d, 30d, 90d, 12m, wtd, mtd, ytd, all. | |
| filters | No | Only visits that match every filter. A value is "is": {"country": "US"}; a list is "is any of": {"country": ["PT", "ES"]}; an object picks the operator: {"page": {"contains": "/blog"}}, {"channel": {"is_not": ["Direct", "Email"]}}, {"page": {"not_contains": "/admin"}}. Operators: is, is_not, contains, not_contains (case-insensitive). "visitor" is "new" or "returning". "ad" is an ad campaign as "google:<campaign id>" or "meta:<campaign id>" (the visits that the Ads page counts for it). Use "(none)" for empty values; countries take ISO codes or English names. |