Get visitor
One visitor's profile: first touch, totals, goals, top pages and their latest sessions with every pageview, goal, payment and error. Identity needs visitors:details.
GET https://usedatasense.com/api/v1/visitors/{visitorId}
Permission: analytics:read + visitors:read. MCP tool: datasense_visitors_get.
Request
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
websiteId |
query | string | With an account token | The website to query. Required with an account token or OAuth connection that can reach several websites; omit with a ds_sk_ website key. |
visitorId |
path | string | Yes | A visitor id from datasense_visitors_search or datasense_analytics_realtime. |
sessions |
query | integer | No | How many of the latest sessions to include. Default 5. 1 to 20. |
sh
curl "https://usedatasense.com/api/v1/visitors/VISITOR_ID" \
-H "Authorization: Bearer ds_sk_xxx"With an account token, add websiteId:
sh
curl "https://usedatasense.com/api/v1/visitors/VISITOR_ID?websiteId=YOUR_SITE_ID" \
-H "Authorization: Bearer ds_at_xxx"Response
json
{
"status": "success",
"data": { … }
}Errors use the standard error format.