API reference / Analytics
Get a visitor
One visitor's profile: who identify said they are, the visit that found the business, and where they are now. It also gives their goals, payments, the days of the last 26 weeks with a visit, and their latest 300 events.
/api/v1/analytics/visitors/{visitor}Other ways to call it
troopy analytics visitors gettroopy_get_analytics_visitorPath parameters
visitor*stringThe visitor's id, as the script or SDK sent it
Response
200 · application/jsondata*object20 properties
visitor*stringname*stringThe name from identify, or else a generated name, like teal otter
identified*booleanimage*string | nulluserId*string | nullfirstSeenAt*stringISO 8601 date and time
lastSeenAt*stringISO 8601 date and time
sessions*integerpageviews*integerrevenue*numberprediction*object | nullNull until the site has 1,000 visitors and 10 payments in 90 days
2 properties
score*integer0 to 100. 50 is a typical visitor, and 100 is a visitor who already paid
expectedValue*integerWhat a visitor like this is worth on average, in minor units
traits*objectidentifiedAt*string | nullfirst*object7 properties
channel*stringreferrer*string | nullutmSource*string | nullutmMedium*string | nullutmCampaign*string | nullhost*stringpath*stringlast*object6 properties
country*string | nullregion*string | nullcity*string | nulldevice*string | nullbrowser*string | nullos*string | nullgoals*array<object>2 properties
name*stringcount*integerpayments*integerfirstPaidAt*string | nullactivity*objectThe days of the last 26 weeks on which the visitor viewed a page (YYYY-MM-DD), and today, in the time zone of the workspace
2 properties
today*stringdays*array<string>events*array<object>8 properties
at*stringISO 8601 date and time
type*stringpage*stringname*string | nullprops*object | nullurl*string | nullamount*number | nullA payment or a refund, in minor units
currency*string | null