Get a site visitor
const url = 'https://digize.com/api/v1/analytics/visitors/example?days=90';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://digize.com/api/v1/analytics/visitors/example?days=90' \ --header 'x-api-key: <x-api-key>'One visitor across their sessions: when they were first and last seen, each session, everything they led to (leads, bookings, checkouts, purchases, refunds) and the CRM contact those name.
Needs the analytics:read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The visitor id, from a session.
Query Parameters
Section titled “Query Parameters”How many days back from now to read: 90 at most.
How many days back from now to read: 90 at most.
Responses
Section titled “Responses”Done
object
The newest first.
object
The persistent visitor id; null when the browser kept none.
Which of the visitor’s sessions this is, from 1; 0 when unknown.
Page views.
The UTM source, or the referring host when there’s none; empty for direct.
What the session led to, as the server recorded it.
object
Added up, in minor units of currency; refunds positive.
JavaScript errors.
Pages answered 404 or 5xx.
The furthest scroll mark reached, in percent.
The slowest Largest Contentful Paint, where the browser reports it.
Whether a replay was recorded.
More sessions than are listed.
object
Added up, in minor units of currency; refunds positive.
The newest first.
object
The order, checkout, appointment or contact it made.
Example
{ "sessions": [ { "outcomes": [ { "name": "lead" } ], "bot": "bot" } ], "totals": [ { "name": "lead" } ], "outcomes": [ { "name": "lead" } ]}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}