Example API Call
The data used in the following explanations comes from this API callThis API call returns data on a Page basis. Each page may have multiple questions represented in the questions array
questions array
The outer level of the main data is an array called questions holding one JSON object for each individual question the respondent saw.
It typically has the following fields
Time data
All time fields are named as follows and occur multiple times in the data for different sections and events recorded.
productViewEvents array — Product click (view or select events)
This is where the respondent interacted with a product in some way other than just hovering the mouse pointer — they clicked the product on the shelf.
productViewEvents array is found within a given questions qResponseData object and typically looks like this: (Exact fields vary by client and product, null field values to be expected)
basketContent array — Products placed into shopping basket
Holds an object for every product placed into the virtual shopping basket along with data on qty in basket, price and so on:Note! This is the final contents of the basket. It does not indicate order or placing items in and taking items out of the basket.
basketEvents array — fine details on what was added and removed from the basket
This holds one object per interaction with the basket which is adding or removing a product from the basket or changing the quantity in basket for a given product.Note! For every ProductAddedToCart event there is always at least one ProductQtyChangedInCart because technically adding a first product changes the qty in cart from zero to 1. If a user adds that product a second time only the ProductQtyChangedInCart event is triggered changing qty from 1 to 2.
Start time of survey (which is also start time of page on single page survey sessions)
The base start time for the page is in the startTime field at the outer level of the data:
Time to first product selection
The first product selection is the first time a respondent clicks a product on the shelf. This can be found by sorting the records in the productViewEvents array by startTime and taking the earliest.
...
first_product_selected_startTime - pageStartTime
Time to first product in basket
The first product placed in the basket can be found by:
...
earliest_productAddedToBasket_startTime - pageStartTime
Products in basket in order of selection
Products placed in basket do not have to have all their qty added in a single go. That's why we have both a ProductAddedToCart and ProductQtyChangedInCart events.
...
Note! use the productID field for the above cross checks.
Time to checkout
This is found by looking for the FinishShopping event in the eventStream array and using the startTime
...