Skip to content

Realtime

GET /api/v1/sites/:id/realtime

The same snapshot the Realtime screen polls.

None. Every window is fixed, and range and the filter keys are ignored.

Element Window
activeVisitors last 5 minutes
pageviewsPerMinute last 1 minute
eventsLastHour last 1 hour
series one point per minute for the last 30 minutes
recent the newest 30 events from the last 30 minutes
pages, referrers, countries last 30 minutes, top 6 each
visitors one row per visitor seen in the last 5 minutes, up to 200
Terminal window
curl -s -H "Authorization: Bearer tk_live_…" \
"https://tracing.tools/api/v1/sites/pk_live_a91c3f04/realtime"
{
"data": {
"activeVisitors": 17,
"pageviewsPerMinute": 9,
"eventsLastHour": 1204,
"series": [
{ "date": "17:12", "Visitors": 4 },
{ "date": "17:13", "Visitors": 6 }
],
"recent": [
{
"id": 88412097,
"path": "/pricing",
"type": "pageview",
"name": null,
"country": "DE",
"browser": "Chrome",
"device": "desktop",
"at": "2026-09-16T17:41:02Z"
},
{
"id": 88412096,
"path": "/pricing",
"type": "custom",
"name": "cta_click",
"country": "FR",
"browser": "Safari",
"device": "mobile",
"at": "2026-09-16T17:40:58Z"
}
],
"pages": [
{ "name": "/", "value": 41, "events": 63 },
{ "name": "/pricing", "value": 22, "events": 29 }
],
"referrers": [
{ "name": "Direct / none", "value": 38, "events": 71 },
{ "name": "google.com", "value": 12, "events": 14 }
],
"countries": [
{ "name": "DE", "value": 19, "events": 33 },
{ "name": "US", "value": 14, "events": 25 }
],
"visitors": [
{
"visitorId": "e7d2840001vl",
"lat": 52.52,
"lon": 13.41,
"country": "DE",
"region": "Berlin",
"city": "Berlin",
"browser": "Chrome",
"os": "macOS",
"device": "desktop",
"referrerDomain": "google.com",
"path": "/pricing",
"title": "Pricing",
"startedAt": "2026-09-16T17:36:11Z",
"lastSeenAt": "2026-09-16T17:41:02Z",
"pageviews": 4
},
{
"visitorId": "e7d28400000b",
"lat": null,
"lon": null,
"country": "US",
"region": null,
"city": null,
"browser": "Safari",
"os": "iOS",
"device": "mobile",
"referrerDomain": null,
"path": "/",
"title": "Tracing",
"startedAt": "2026-09-16T17:40:44Z",
"lastSeenAt": "2026-09-16T17:40:58Z",
"pageviews": 1
}
]
}
}
Field Meaning
activeVisitors Distinct visitors in the last 5 minutes
pageviewsPerMinute Pageviews in the last minute — a rate sampled once, not an average
eventsLastHour Every event type in the last hour
series[].date HH:MM in UTC, zero-filled minute by minute
recent[].type pageview, custom, outbound or revenue
recent[].name The event name, null for a pageview. For an outbound click it is the full destination URL
recent[].at ISO 8601 with an explicit Z
pages, referrers, countries Standard breakdown rows
visitors[] The people behind activeVisitors — one row each, newest event first, capped at 200. Every field describes their newest event. This is what the globe on the Realtime screen draws, one face per row
visitors[].visitorId The daily-rotating salted hash, or the first-party cookie id in cookie mode. It is not stable across days and is not a person
visitors[].lat, visitors[].lon City-level coordinates rounded to two decimals. Both are null when the visitor only resolved to a country; the dashboard then draws the face at the centre of that country
visitors[].region, visitors[].city Where the newest event resolved to, null when the collector did not know
visitors[].device desktop, mobile, tablet or unknown
visitors[].referrerDomain The domain that sent them, null for direct traffic
visitors[].path The page they are on now — the path of the newest event
visitors[].startedAt ISO 8601 with a Z. The start of the open session, or their oldest event in the five-minute window when no session row has been stitched yet
visitors[].lastSeenAt ISO 8601 with a Z, the time of the newest event
visitors[].pageviews Pageviews in this visit

The dashboard polls every 5 seconds and treats three consecutive failures as a disconnection. If you poll it yourself, five seconds is a reasonable floor — these are real aggregate queries.

There is no streaming endpoint, no webhook and no long poll.

Status Body
401 {"error":"Missing or invalid API key"}
404 {"error":"site not found"}

A site with no traffic returns zeros and empty arrays, not an error.