Response schema
Table of contents
By default, the Sessions API will return JSON like this:
{
"sessions": [
{
"id": "MTY4NjkxOTQwNGM3YTFfN1ZmDTM9Y2QtNDdmMi1hZjf2LTDlODM5NWNjNDVlZUdxc09XekpNR29TbZtXSlBCcSRQREVqWUpJT1IzSUED",
"visitor_id": "imtTJbY5diIz0zm7tV4AiLeQUlIf1avm",
"form_uuid": "3a5b3247-18d2-4170-a71b-90d9248ce31a",
"time": "2023-03-01T00:06:28Z",
"duration": 202534,
"viewed": true,
"started": true,
"completed": true,
"viewed_at": "2023-03-01T00:06:28Z",
"started_at": "2023-03-01T00:06:33Z",
"completed_at": "2023-03-01T00:09:51Z",
"attributes": {
"deviceType": "desktop",
"browserFamily": "Chrome",
"Operating System": "Windows",
"trafficMedium": "none",
"Visitor Type": "Returning",
"autofillTriggered": false
},
"last_touched_field": {
"html_id": "submit",
"html_tag_name": "BUTTON",
"html_type": "submit",
"html_name": "submit"
},
"total_field_returns": 4
}
],
"next_page_id": "NUX2Nkb4NCB2MkTwMB=="
}
Note: Depending on the optional includes
parameter(s), there may be additional fields in the response.
sessions
The value of this key is an array containing up to 4000 session objects.
Each session has a series of properties.
id
A string containing a unique ID given to a session.
visitor_id
A string containing a unique ID of the visitor.
form_uuid
A string containing the form UUID of the form which the session belongs to.
This will match the form UUID defined in the query.
time
A string containing a ISO 8601 formatted timestamp of when the visitor views the form and starts interacting.
duration
An integer representing the total amount of elapsed time between the visitor viewing the form and completing or abandoning.
viewed
A boolean value describing if the session has been viewed or not.
started
A boolean value describing if the session has been started or not.
A session is classed as started when Zuko tracks at least one interaction event on at least one field in the form.
completed
A boolean value describing if the session has been completed or not.
A session is classed as completed when Zuko receives a compeletion event within 30 mins of the last interaction in the session.
If no completion event is received within this timeframe, the session is classed as abandoned. This is represented in the response as completed=false
.
viewed_at
A string containing a ISO 8601 formatted timestamp of when the visitor views the form.
started_at
A string containing a ISO 8601 formatted timestamp of when the visitor starts interacting with the form.
completed_at
A string containing a ISO 8601 formatted timestamp of when the visitor successfully completes the form.
attributes
A hash of attributes relating to the session.
This is a combination of the default attributes Zuko provides and any custom attributes you provide during the course of the session.
See the attributes section for more information.
last_touched_field
A hash of attributes representing the last field that was interacted within a session.
See the fields section for more information on these attributes.
total_field_returns
An integer representing the total amount of times that a visitor returned to a field in the session.
See the field returns section for more information.
next_page_id
The ID of the next page of sessions in the result-set returned by the query submitted in the request.
See the pagination section for more information on how this is used.