Query traffic over time
query_timeseriesDaily pageviews and unique visitors for one landing page, optionally split by a dimension (device type, country, referrer, page path, UTM source/medium/campaign) and filtered to one device or country.
Use when the user asks how traffic moved day by day, or which device, country, or source drove a change. For a one-call overview use get_analytics_summary; for period-over-period comparison use get_analytics_detail. Each row has date, dimensionValue ("all" when no dimension is set), pageviews, and visitors. Visitors are unique per day, so don't add them up across days. Data covers the last 3 months and excludes known bots and vulnerability scanners, the same as get_analytics_summary. Scans count toward the monthly analytics scan quota and overage billing where applicable. Dates must be valid calendar dates in YYYY-MM-DD format, and startDate must be on or before endDate. Dates are days in the workspace's time zone, UTC when the workspace has none set, and startDate and endDate are whole days in the zone used. Pass timeZone, an IANA name such as America/New_York, for days in another zone; it changes only this response, never the workspace's time zone. The result's timeZone field names the zone used, and timeZoneSource says where it came from (argument, workspace, or default). A row for today's date in that zone counts only the hours so far. When timeZonePending is set, the workspace is switching to that zone once its history is recomputed. Supported filters are device (mobile, desktop, tablet) and country (two-letter code such as JP or US).
Combine results with detect_trend to confirm trends.
Examples:
Basic traffic: query_timeseries(siteId, "2026-09-01", "2026-09-28")
By device: query_timeseries(siteId, "2026-09-01", "2026-09-28", dimension="device")
By UTM source: query_timeseries(siteId, "2026-09-01", "2026-09-28", dimension="utm_source")
Mobile only: query_timeseries(siteId, "2026-09-01", "2026-09-28", filters={device:"mobile"})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows to return. Defaults to 100, max 500. | |
| siteId | Yes | The ID of the page to query | |
| endDate | Yes | End date (YYYY-MM-DD) | |
| filters | No | Optional filters to narrow results. Supported keys: device, country | |
| timeZone | No | IANA time zone name for the days in this response, such as America/New_York, Europe/Berlin, or Asia/Tokyo. Leave it out for the workspace's time zone (UTC when none is set). It affects only this response: the workspace's time zone stays as it is, and only the workspace's owner changes it, in the dashboard's Settings. Abbreviations such as EST and offsets such as +09:00 aren't accepted. | |
| dimension | No | Optional dimension to break down results by | |
| startDate | Yes | Start date (YYYY-MM-DD) |