Docs·Visitors and people

GET/api/v1/event/analytics/web-analytics/visitors/:visitorId/sessions

List a visitor's sessions

The sessions of one profile that started in the date range, newest first and paged: the Sessions view on a profile page. Takes a visitor id or a person id, and a person's sessions cover every device they used. Rows have the same fields as /sessions; for the individual events, call /events/feed with profileId.

Keys: an account key. Getting started explains both kinds.

Parameters

PropInTypeNotes
visitorIdpathstringA visitor id (id on a visitor row) or a person id (contactId). A person id covers every device that person used.
contactListIdquerystringThe id of the audience (the tracked site) to read, a UUID: anything else returns a 400. You must be a member of the workspace the audience belongs to, or the call returns a 401. An id that matches no audience is not an error: the call returns no data.
startDatequerystringStart of the date range, read as UTC: a date such as 2026-09-01 (from midnight), or an exact time such as 2026-09-01T09:30:00Z. Use one of these two forms.
endDatequerystringEnd of the date range, read as UTC. A date such as 2026-09-30 includes that whole day; an exact time such as 2026-09-30T18:00:00Z ends the range right before that moment. If the workspace has gone past its plan's event allowance this billing period, the range is cut short at the moment the allowance ran out.
pagequerynumberPage number, starting at 0.
pageSizequerynumberRows per page.
search?querystringKeep only sessions whose entry path, entry hostname, visitor email or visitor id contains this text, ignoring case.

Response

PropTypeNotes
contentSessionListRow[]One row per session, newest first.
sizenumberThe pageSize you asked for.
pagenumberThe page you asked for, counted from 0.
totalItemsnumberRows across all pages.
totalPagesnumbertotalItems divided by size, rounded up.

Each item in content

PropTypeNotes
idstringThe session id.
visitorIdstringThe visitor (browser) the session belongs to.
visitorDisplaystringThe visitor's email when identified, else the visitor id.
contactIdstringThe person id when the visitor is identified. Left out for anonymous visitors.
startedAtstringWhen the session started, in UTC with milliseconds, such as 2026-09-30 14:03:12.345+00.
durationnumberLength in milliseconds as last reported, 0 until the session first ends.
pageCountnumberPage views in the session.
entryPathstringPath of the first page.
entryHostnamestringHostname of the first page.
isBouncebooleantrue when the session had one page and no interactions (your own events or link clicks; the automatic scroll event does not count). It is set when the session ends, so it reads false until then.
exitPathstringPath of the last page viewed so far.
exitHostnamestringHostname of that last page.
eventCountnumberEverything recorded in the session: page views, your own events, scroll and link-click events.
channelstringChannel the visit came through, such as Organic Search or Direct.
referrerSourcestringSource of the visit, such as Google, '' when none.
countrystringTwo-letter country code, '' when unknown.
regionstringRegion, '' when unknown.
citystringCity, '' when unknown.
browserstringBrowser, such as Chrome.
osstringOperating system, such as Windows.
devicestringDesktop, Mobile or Tablet.

Request

curl 'https://app.spreelytics.com/api/v1/event/analytics/web-analytics/visitors/:visitorId/sessions?contactListId=…&startDate=…&endDate=…&page=…&pageSize=…' \
  -H 'Authorization: Bearer YOUR_API_KEY'
const url = new URL('https://app.spreelytics.com/api/v1/event/analytics/web-analytics/visitors/:visitorId/sessions');
url.searchParams.set('contactListId', '…');
url.searchParams.set('startDate', '…');
url.searchParams.set('endDate', '…');
url.searchParams.set('page', '…');
url.searchParams.set('pageSize', '…');

const res = await fetch(url, {
  headers: { Authorization: 'Bearer YOUR_API_KEY' },
});
const data = await res.json();
import requests

res = requests.get(
    "https://app.spreelytics.com/api/v1/event/analytics/web-analytics/visitors/:visitorId/sessions",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    params={"contactListId": "…", "startDate": "…", "endDate": "…", "page": "…", "pageSize": "…"},
)
data = res.json()

Response

{
  "content": [
    {
      "id": "string",
      "visitorId": "string",
      "visitorDisplay": "string",
      "contactId": "string",
      "startedAt": "string",
      "duration": 0,
      "pageCount": 0,
      "entryPath": "string",
      "entryHostname": "string",
      "isBounce": true,
      "exitPath": "string",
      "exitHostname": "string",
      "eventCount": 0,
      "channel": "string",
      "referrerSource": "string",
      "country": "string",
      "region": "string",
      "city": "string",
      "browser": "string",
      "os": "string",
      "device": "string"
    }
  ],
  "size": 0,
  "page": 0,
  "totalItems": 0,
  "totalPages": 0
}

See your own numbers today.

Free up to 100k events a month · no credit card

Contact

Tell us what you need.

A real person reads these. We usually reply within one working day.

Or email us directly at contact@spreelytics.com.