Sessions

Get a visitor's session activity

GET/api/websites/{websiteId}/sessions/{sessionId}/activity

Returns activity for the specified session and sessions linked by visitor identity, using the requested date range and optional distinct ID.

Headers

NameTypeDescription
AuthorizationrequiredstringAuthentication credentials, e.g. Bearer <token>.

Path parameters

NameTypeDescription
websiteIdrequiredstringID of the website.
sessionIdrequiredstringID of the visitor session.

Query parameters

NameTypeDescription
startAtrequiredintegerStart of the date range as a Unix timestamp in milliseconds.
endAtrequiredintegerEnd of the date range as a Unix timestamp in milliseconds.
distinctIdstringCustom identifier assigned to the visitor.

Responses

200The operation completed successfully.
NameTypeDescription
createdAtrequiredstringDate and time the record was created.
eventIdrequiredstringID of the event.
eventNamerequiredstringName of the custom event.
eventTyperequirednumberEvent type: 1 for a pageview or 2 for a custom event.
hasDatarequiredboolean
hostnamerequiredstringHostname on which the activity occurred.
referrerDomainrequiredstringDomain of the referring page.
urlPathrequiredstringPath portion of the page URL.
urlQueryrequiredstringQuery string portion of the page URL.
visitIdrequiredstringID of the visit.
200 example
400Bad request.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
400 example
401Unauthorized.
NameTypeDescription
errorrequiredobjectError details returned when the operation fails.
401 example

Code samples

cURL