Query analytics totals and breakdowns
websiteAnalytics_query_getReturns aggregate engagement totals — page views, distinct visitors, visits, bounces, and total time in seconds — for a date range, optionally broken down by one dimension. Use it to answer "how much traffic did the site get" and "what are the top pages/referrers/countries" style questions; use the timeseries endpoint when you need values over time instead. startAt and endAt are Unix epoch milliseconds; optional filter parameters (path, referrer, country, event, UTM fields, ...) narrow the data. Without dimension the response carries the totals alone. With dimension (e.g. path for top pages, referrer for top referrers, country for top countries) the response also carries rows: up to limit (default 25, max 1000) values of that dimension ranked by page views, each with its own engagement totals. Requires a plan that includes analytics (403 otherwise); all-zero totals until the website is published and has traffic.
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": {
"websiteId": "<websiteId>",
"startAt": "<startAt>",
"endAt": "<endAt>"
},
"name": "websiteAnalytics_query_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| os | No | ||
| tag | No | ||
| city | No | ||
| path | No | ||
| endAt | Yes | ||
| event | No | ||
| limit | No | Maximum number of dimension rows to return (default 25, max 1000). Only used when `dimension` is set. | |
| query | No | ||
| title | No | ||
| cohort | No | ||
| device | No | ||
| region | No | ||
| browser | No | ||
| country | No | ||
| segment | No | ||
| startAt | Yes | ||
| utmTerm | No | ||
| hostname | No | ||
| language | No | ||
| referrer | No | ||
| dimension | No | Break the range down by this dimension, e.g. `path` for top pages, `referrer` for top referrers, `country` for top countries. Omit for totals only. | |
| utmMedium | No | ||
| utmSource | No | ||
| websiteId | Yes | ||
| distinctId | No | ||
| utmContent | No | ||
| utmCampaign | No |