Steersman Odoo website chat event tracking

Capturing tracking events
Steersman Odoo chat emits browser events for integration with tracking and analytics services. All events supply at least two values: channel_id and event; some events provide more details. A listener for a single event can be configured as such:
// The name of this function doesn't matter, make sure it's unique
// and correctly used in the document event listener on the last line
function myChatGreetingClickEventHandler(event)
{
// fire a GA4 event
gtag('event', 'start_chat', {
'event_category': 'chat',
'event_label': 'start',
'value': event.detail.channel_id, // Odoo chat channel ID
});
// push to GTM dataLayer
dataLayer.push({
'event': 'start_chat',
'channelId': event.detail.channel_id, // Odoo chat channel ID
});
}
document.addEventListener('sbs_chat_greeting_click', myChatGreetingClickEventHandler, {passive: true});
Testing tracking events
It’s possible to setup a single event handler for all chat events for testing or capturing all events the same way:
function testSbsChatEventHandler(event)
{
console.log('SBS Odoo Chat Event Fired', event.detail);
}
const sbsChatEvents = [
'header_button_click',
'greeting_show', 'greeting_hide', 'greeting_click',
'window_fold_hide', 'window_fold_show',
'session_sign_in', 'session_signed_in',
'session_end', 'session_end_confirm', 'session_end_cancel',
'session_feedback_rate ', 'session_feedback_send', 'session_feedback_skip',
'session_transcript_send', 'session_transcript_skip',
'contact_form_open', 'contact_form_send', 'contact_form_close',
];
sbsChatEvents.forEach(
name => document.addEventListener(`sbs_chat_${name}`, testSbsChatEventHandler, {passive: true})
);
List of events and event detail values
- Chat header/tab/bar button
sbs_chat_header_button_clickmessage— header bar text.
- Chat greeting
sbs_chat_greeting_show— automatic greeting popped up.operator_id— ID of the operator displayed on the greeting.message— greeting message.cta— button call to action text.
sbs_chat_greeting_hide— visitor closed the automatic greeting.operator_idmessagecta
sbs_chat_greeting_click— visitor clicked the greeting action button to proceed.operator_idmessagecta
- Chat window
sbs_chat_window_fold_hide— chat window folded down.sbs_chat_window_fold_show— chat window unfolded.
- Chat session
sbs_chat_session_sign_in— visitor clicked “Start Chatting” on the sign-in prompt, chat session hasn’t started yet.sbs_chat_session_signed_in— visitor clicked “Start Chatting” on the sign-in prompt, chat session started.sbs_chat_session_end— chat session end was initiated.closed_by_agent— “true” if session was ended by a chat operator.
sbs_chat_session_end_confirm— visitor confirmed chat session end.sbs_chat_session_end_cancel— visitor cancelled chat session end.sbs_chat_session_feedback_rate— visitor rated the chat experience.value— rating value.
sbs_chat_session_feedback_send— visitor provided additional chat session feedback.sbs_chat_session_feedback_skip— visitor skipped chat rating and/or additional feedback.sbs_chat_session_transcript_send— visitor requested chat transcript to be emailed.sbs_chat_session_transcript_skip— visitor skipped chat transcript.
- Contact form
sbs_chat_contact_form_open— visitor opened the contact form while all chat operators were offline.sbs_chat_contact_form_send— visitor filled out and submitted the contact form.sbs_chat_contact_form_close— visitor closed the contact form.
Related posts

How to Set Up GA4 Events in Google Tag Manager
Tracking user behavior and ecommerce interactions accurately is essential for making data-driven decisions. If your website already sends event data to the data layer, the next step is configuring Google Tag Manager (GTM) to forward that data into Google Analytics 4 (GA4). This guide walks you through setting up ecommerce, custom, search, and login events in GTM.

Display Relevant Customer Info In Odoo Live Chat Side Panel
This new Steersman-designed panel helps sales and support teams respond faster and smarter, without switching tabs or digging through unrelated records.

Promotions and Coupons for Odoo
The difference between promotion and coupon setups in Odoo as well as recommendations for which discount to use when as well as how to set them up.

Receiving Advanced Shipping Notices (ASN) in Odoo
An EDI 856 is an Advance Shipping notice (ASN). It is used to send and receive information regarding upcoming shipments and deliveries. The EDI 856 inbound integration offered by Steersman enables businesses using Odoo to receive Advanced Shipping Notices (ASNs) from the their suppliers.