Analytics query reference
Exact shared date, traffic, comparison and filter parameters.
On this page
Common arguments
| Argument | Type | Default / behavior |
|---|---|---|
| projectId | UUID string | Key's site; required when no single-site default exists |
| range | enum | 30d; today, yesterday, 7d, 30d, 90d, 12mo, custom |
| from | YYYY-MM-DD | First local date for custom ranges |
| to | YYYY-MM-DD | Last local date, inclusive; must be >= from |
| traffic | enum | human; known_bot, suspicious, unknown, all |
| compare | boolean | true, comparison with previous equal period |
| filters | array | Up to 20 clauses, each with field, op, value |
These parameters apply only to tools whose schema includes them. Realtime, management and record lookups have different shapes. A schema's default applies when the argument is omitted, not when an arbitrary null is sent.
Dimension names
source, medium, url_path, referrer_domain, utm_source, utm_medium, utm_campaign, utm_term, utm_content, country, region, city, device_type, browser, os and event_name.
get_breakdown additionally accepts channel and hostname for its dimension argument. Those extra breakdown choices are not generic filter fields. Page mode can be top, entry or exit where supported.
Filter operators
is, is_not and contains. A value must be a nonempty string of at most 500 characters. Multiple clauses narrow the same query. Timeseries supports hour, day and week granularity; use the tool's own limit bounds and allowed arguments.
Custom-range example
{
"projectId": "00000000-0000-4000-8000-000000000001",
"range": "custom",
"from": "2026-10-01",
"to": "2026-10-07",
"traffic": "human",
"compare": true,
"filters": [
{ "field": "utm_source", "op": "is", "value": "newsletter" },
{ "field": "url_path", "op": "contains", "value": "/pricing" }
]
}Replace the placeholder UUID with a project returned by list_projects. Dates use the site's timezone, including daylight-saving boundaries; returned timestamps identify UTC instants.
Still looking for an answer? Try troubleshooting or get in touch.