Skip to main content
Website analytics is served by three endpoints: query for engagement totals and dimension breakdowns, timeseries for values over time, and realtime for who is on the site right now.
Analytics requires the Pro plan or higher. On lower plans these endpoints return 403 with kind forbidden. See Plans and limits.

Prerequisites

Time ranges and filters

The query and timeseries endpoints take startAt and endAt as Unix epoch timestamps in milliseconds, and accept these optional filters as query parameters: path, referrer, title, query, browser, os, device, country, region, city, language, hostname, tag, event, distinctId, utmSource, utmMedium, utmCampaign, utmContent, utmTerm, segment, cohort.
1

Read engagement totals

GET /v1/websites/{websiteId}/analytics/query returns totals for the range.
Last 7 days of totals
Response
Add a filter to scope the totals, for example --data-urlencode 'country=US'. A website with no recorded traffic returns the same shape with zeros.
2

Break down by dimension

Add dimension to the same endpoint to rank values of one dimension alongside the totals. dimension is one of: path, entry, exit, title, query, referrer, channel, domain, country, region, city, browser, os, device, language, screen, event, hostname, tag, distinctId. limit caps the rows (default 25, max 1000).
Top pages
Response (truncated)
rows is present only when dimension is set, ranked by page views with full engagement totals per value.
3

Read a time series

GET /v1/websites/{websiteId}/analytics/timeseries returns one series bucketed by unit (year, month, day, hour, or minute). series selects which:
  • series=pageviews returns parallel pageviews and sessions arrays, one point per bucket. Optional compare (prev for the previous period, yoy for a year earlier) requests comparison data.
  • series=events returns tracked custom-event counts in events, one point per event name per bucket, shaped { "x": "<event>", "t": "<period>", "y": <count> }. compare is not valid here.
Optional timezone (an IANA name) controls bucket boundaries, and maxPoints (default 30, max 500) caps how many of the most recent time buckets are returned.
Daily pageviews
Response (truncated)
Only the requested series’ fields are present. When a query produces more buckets than maxPoints, only the most recent buckets are returned and the response carries a truncated field with shown, total, and a hint. Request a coarser unit, a narrower range, or a larger maxPoints for full coverage.
4

Watch realtime activity

GET /v1/websites/{websiteId}/analytics/realtime takes no range and returns a compact snapshot of Umami’s trailing 30-minute realtime window:
Realtime snapshot
Response
visitors is the distinct visitor count in that 30-minute window; timestamp is the snapshot time as ISO 8601. This is not directly comparable to the removed active endpoint, which counted distinct visitors over five minutes.

Troubleshooting

Next steps