Full traffic report
umami_traffic_reportBuild a complete website traffic report in one call: headline stats, period-over-period changes, and ranked breakdowns by top pages, referrers, channels, countries, devices, and browsers.
Instructions
Build a complete traffic report for a website in one call: headline stats, period-over-period change, and ranked breakdowns for top pages, landing pages, referrers, acquisition channels, countries, devices, and browsers.
Prefer this over chaining umami_get_stats and several umami_get_metrics calls when the question is broad, for example "how is the site doing" or "give me last month's analytics". Use the individual tools instead when you need one specific dimension, deeper pagination, or expanded engagement metrics.
Args:
website (string, optional): Website ID, name, or domain.
range (string): Date range, default '30d'.
start_date / end_date (string, optional): Explicit bounds, overriding 'range'.
breakdowns (array of strings, optional): Which dimensions to include. Defaults to path, entry, referrer, channel, country, device, browser.
limit (number): Rows per breakdown, 1-50 (default: 10).
compare (boolean): Include the previous period of equal length with percent change (default: true).
filters (object, optional): Segment filters applied to every part of the report.
response_format ('markdown' | 'json'): Output format (default: 'markdown').
Returns: JSON shape: { "website": string, "range": { "start": string, "end": string }, "stats": { "pageviews": number, "visitors": number, "visits": number, "bounce_rate_pct": number, "avg_visit_duration_seconds": number }, "change": { "pageviews": string, "visitors": string, "visits": string } | null, "breakdowns": { "": [ { "name": string, "visitors": number, "share_pct": number } ] } }
Examples:
"Give me the analytics rundown for last month" -> range="last_month"
"How did the site do this week versus last?" -> range="this_week", compare=true
"Full report for US mobile traffic" -> filters={ country: "US", device: "mobile" }
Error handling:
Individual breakdowns that fail are omitted rather than failing the whole report; the response notes which ones were skipped.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Rows per breakdown. | |
| range | No | Date range for the query, default '7d'. Relative ("30m", "24h", "7d", "4w", "3mo", "1y"), named ("today", "yesterday", "this_week", "last_week", "this_month", "last_month", "this_year", "last_year", "mtd", "ytd", "all_time"), or an explicit ISO date via start_date/end_date. | |
| compare | No | Include the previous period of equal length with percent change. | |
| filters | No | Optional segment filters. Supported keys: path, referrer, title, query, browser, os, device, country, region, city, language, hostname, tag, event, distinctId, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, segment, cohort. Example: { country: 'US', device: 'mobile' }. | |
| website | No | Website ID (UUID), name, or domain. Optional if UMAMI_DEFAULT_WEBSITE is set. Use umami_list_websites to discover values. | |
| end_date | No | Explicit end date (YYYY-MM-DD, ISO 8601 timestamp, or epoch ms). Overrides 'range'. | |
| breakdowns | No | Dimensions to include. Defaults to path, entry, referrer, channel, country, device, browser. | |
| start_date | No | Explicit start date (YYYY-MM-DD, ISO 8601 timestamp, or epoch ms). Overrides 'range'. | |
| response_format | No | Output format: 'markdown' for a readable summary, 'json' for raw structured data. | markdown |