Track user interactions within the Neocom Advisor to gain valuable insights into their behavior
Overview:
With Neocom's interaction tracking, you can capture various user events within the Neocom Advisor and forward this data to your own tracking system (e.g., Google Analytics). To accurately evaluate Neocom's success, we recommend tracking customer interactions both before and after they engage with the Advisor. Additionally, compare the KPIs of users who interact with the Advisor against those who do not. This allows you to collect first-party data from Neocom and utilize it for purposes such as retargeting campaigns.
Key KPIs to track include:
- Bounce rate
- Session duration
- Conversion rate
- Average shopping cart value
How it works:
Neocom's interaction tracking is implemented by integrating a JavaScript function (neocomActionCallback
) into your website. This function enables Neocom to capture specific user events, such as starting a consultation session or answering a question. The captured events can then be forwarded to analytics tools like Google Analytics for further analysis.
Placement: Ideally, place the script in the header of your website, alongside the global embedding code.
Function: neocomActionCallback
is triggered when certain user events occur.
Event Data Structure:
Each event triggers a payload object that contains the following information:
action
: Name of the eventdata
: Additional event detailsneocomID
: Unique ID for the advisormeta
: IncludesconversationId
(tracks individual interactions with an advisor),integrationType
(shows the advisor's integration method), andsessionId
(identifies a user across browser sessions)
Key Events
CONVERSATION_STARTED
a. Trigger: The advisor is loaded and displayed
b. Frequency: Once per session
c.data
: EmptyCONVERSATION_INTERACTED
a. Trigger: The user clicks on the advisor
b. Frequency: Once per session
c.data
: EmptyQUESTION_ANSWERED
:
a. Trigger: The user answers a question
b.data
Structure:
-
question
: Object withid
andname
.answers
: Array of objects withid
andname
.isEndOfConversation
: Boolean indicating if the conversation is complete.products
: Array of recommended products, each withid
(SKU),name
.selectedPriceRange
: Object withmin
,max
(prices), andcurrency
(3-letter code).
-
Example:
<script>
function neocomActionCallback(payload) {
const action = payload.action;
const data = payload.data;
const meta = payload.meta;
// Insert your business logic here
// Example of sending 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:
When a user clicks on a recommended product in the results, the product detail page of your store is loaded. To inform the store that this product was recommended by Neocom, the URL is appended with the parameter neocom_source
and the ID of your Neocom advisor. This URL information can be used in Google Analytics to reference it and create segments.