API reference / Analytics
Get the visitors on the site now
Who is on the site now (a pageview in the last 10 minutes): each visitor's page, rough location, device and source, and the latest pageviews, goals, identifies and payments.
get
/api/v1/analytics/realtimeOther ways to call it
CLI
troopy analytics realtimeMCP tool
troopy_get_analytics_realtimeRate limit120 calls in 60 seconds, for each key
Response
200 · application/jsondata*object3 properties
visitors*integerlist*array<object>13 properties
visitor*stringname*string | nullFrom identify, when the site sent one
page*stringcountry*string | nullcity*string | nulllat*number | nullRounded to 0.1 degrees
lon*number | nullbrowser*string | nullos*string | nulldevice*string | nullreferrer*string | nullchannel*stringlastSeenAt*stringISO 8601 date and time
events*array<object>7 properties
at*stringISO 8601 date and time
type*stringvisitor*stringname*string | nullgoal*string | nullpage*stringcountry*string | nullErrors
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask an organization owner or admin.
429 rate_limitedWait the number of seconds in Retry-After, then retry.