get_aggregate | Get aggregate totals of a site over a period (one row, no grouping). site_id and date_range are required; metrics defaults to visitors, visits, pageviews, views_per_visit, bounce_rate, visit_duration. filters (optional) uses the same array format as query_stats, e.g. [[“is”,“event:page”,[“/pricing”]]]. include_imports (boolean) adds imported data (e.g. from Google Analytics) when possible. |
get_site | Get one site by domain: timezone, custom properties and tracker script configuration. |
get_timeseries | Get a time series of a site over a period: one row per time bucket, empty buckets included (time labels). site_id and date_range are required; interval (hour | day | week | month) picks the bucket, automatic when omitted; metrics defaults to visitors, pageviews. filters (optional) uses the same array format as query_stats, e.g. [[“is”,“event:page”,[“/pricing”]]]. |
get_top_pages | Get the most viewed pages of a site over a period (grouped by event:page, sorted by the first metric, descending). site_id and date_range are required; metrics defaults to visitors, pageviews; limit (1-1000, default 10). filters (optional) uses the same array format as query_stats, e.g. [[“is”,“event:page”,[“/pricing”]]]. |
get_top_sources | Get the main traffic sources of a site over a period, sorted by the first metric, descending. site_id and date_range are required; group_by is one of visit:source (default), visit:referrer, visit:channel, visit:utm_source, visit:utm_medium, visit:utm_campaign; metrics defaults to visitors; limit (1-1000, default 10). filters (optional) uses the same array format as query_stats, e.g. [[“is”,“event:page”,[“/pricing”]]]. |
list_goals | List the goals of a site (id, goal_type event | page, display_name, event_name, page_path, custom_props), with cursor pagination. A goal display_name is the value to use with the event:goal dimension or filter. |
list_sites | List the sites the key can access (domain, timezone), with cursor pagination (after / before / limit). team_id (from list_teams) restricts to one team. The domain is the site_id of every other action. |
list_teams | List the teams the account can access (id, name, api_available), with cursor pagination (after / before / limit). |
query_stats | Query stats (Stats API v2, read-only POST). Arguments: site_id (string, required: site domain); metrics (required array of strings among visitors, visits, pageviews, views_per_visit, bounce_rate, visit_duration, events, scroll_depth, percentage, conversion_rate, group_conversion_rate, average_revenue, total_revenue, time_on_page); date_range (required: shortcut string like “7d” or a 2-string ISO array [“2026-01-01”,“2026-01-31”]); dimensions (optional array of strings to group by, e.g. [“event:page”], [“visit:source”], [“visit:country_name”,“visit:city_name”], [“time:day”], [“event:goal”], [“event:props:<name>”]); filters (optional array, e.g. [[“is”,“event:page”,[”/”]]] — see the field description); order_by (optional array of [metric_or_dimension, “asc”|“desc”] pairs); include (optional object: imports, time_labels, total_rows booleans); pagination (optional object {limit, offset}). Returns results as rows of {dimensions: […], metrics: […]} in the order requested, plus meta and the executed query. |