Interaction Tracking & First Party Data

Track the user interactions within the Neocom advisor.

There are different events through which you can track the interactions of your customers within the Neocom advisor and transfer them to your own tracking system (e.g. Google Analytics).

To accurately evaluate the impact of Neocom, we strongly recommend tracking the user before and after entering the Neocom advisor. In addition, you can compare the KPIs of the customers that use the advisor with those that do not. Thus, you can collect first party data from Neocom and use it for retargeting, for example. 

KPIs to compare could include

  • Bounce rate
  • Session duration
  • Conversion rate
  • Average shopping cart value

How it works

The interaction tracking feature of Neocom works by integrating a JavaScript function (neocomActionCallback) into your website. This function enables Neocom to capture specific user events like starting an advisor session or answering a question. Once captured, these events can be transferred to tools like Google Analytics for further analysis.
Implementation
  • Location: Ideally, place the script in the header of your webpage, alongside the Global Embed Code.
  • Function: neocomActionCallback activates when specific user events occur.
Event Data Structure
  • Payload: Each event triggers a payload object.
  • Contents: The payload includes: 
    • action: Name of the event.
    • data: Additional event details.
    • neocomID: Unique identifier for the advisor.
    • meta: Contains conversationId (tracks individual interactions with an advisor), integrationType (shows advisor integration method) and sessionId (identifies a user across a browser session).
Key Events
  1. CONVERSATION_STARTED
    a. Trigger: When the advisor is loaded and displayed.
    b. Frequency: Once per session.
    c. data: Empty.
  2. CONVERSATION_INTERACTED:
    a. Trigger: User clicks on the advisor.
    b. Frequency: Once per session.
    c. `data`: Empty.
  3. QUESTION_ANSWERED:
    a. Trigger: Each time a user answers a question.
    b. dataStructure:
        i:   question: Object with id and name.
        ii:  answers: Array of objects with id and name.
        iii: isEndOfConversation: Boolean indicating if the conversation is complete.
        iv: products: Array of recommended products, each with id (SKU), name.
        v:  selectedPriceRange: Object with minmax (prices), and currency (3-letter      code).
  4. SAVE_FOR_LATER_EMAIL_REQUESTED:
    a. Trigger: User submits the Save For Later form
    b. Frequency: Can be multiple times per session 
    c. data Structure:

                 i:  email_address: The email address of the user
                 ii: products: Array of up to 3 recommended products, each with                  id (SKU), name.

Example
<script>

function neocomActionCallback(payload) {

const action = payload.action;

const data = payload.data;

const meta = payload.meta;

// Add you custom business logic here.
// Below is an example to send the data to Google Tag Manager

if (window.dataLayer) {

dataLayer.push({

"event": "Neocom",

"action": payload.action,

"advisorId": meta.advisorId,

"conversationId": meta.conversationId,

"sessionId": meta.sessionId,

"payload": payload.data
});
}
}
</script>

Result Tracking

By clicking on a suggested product in the results, the product detail page of your store will be loaded. To tell the store that this product was recommended by Neocom, the parameter neocom_source with the ID of your Neocom consultant is added to the URL.
This info in the URL can be used to reference it in Google Analytics, for example, and create segments.