Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

Example API Call

The data used in the following explanations comes from this API call

https://eu-fra-maple.conceptsauce.io/?projectid=d9a9f217-0c9a-498e-b461-e96976a92f36&pageid=01ae82e8-d354-4c76-8abc-56614fefdde1&respondentid=davidtest

This 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.

The actual elapsed time to first product selection is thus:

    first_product_selected_startTime - pageStartTime

Time to first product in basket

The first product placed in the basket can be found by:

  • filtering the basketEvents array for ProductAddedToCart events
  • sorting the added to cart events on startTime and taking the earliest

The actual elapsed time to first product placed in basket is thus:

    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.

If one does not care about split adds, that is a sequence such as:

    productA added once -> productB added -> productA added a second time

Then the answer should be productA, productB and can be found in the basketEventsArray as follows:

  • Filter for only ProductAddedToCart events and sort by startTime
  • cross check with the entries in the basketContent array and remove product that is not in both (this accounts for product that was added to cart and then removed later)

If one needs to account for split adds; so the expected answer in the example above would be: productA, productB, productA then the answer is found in the basketEventsArray as follows:

  • Filter for only ProductQtyChangedInCart events and sort by startTime
  • cross check with the entries in the basketContent array and remove product that is not in both (this accounts for product that was added to cart and then removed later)

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




  • No labels