Event list
Events without a Meta event are only available for Google Analytics.
Parameters
Every event carries:
Some events carry extra parameters:
Each product in
items can have item_id, item_name, price, quantity, item_brand, item_variant and, for view_item_list, index (its position in the reply). Fields are only included when Totebot knows them.
Data layer format
With the Through my website’s Google tag or Both delivery mode, the embed script on your page receives each event from the chat widget and does two things:- Pushes it into
window.dataLayer. - Calls
window.gtagif your page has it.
item_list_name sits inside ecommerce. search_term and lead_source sit at the top level. Keys are only present when they have a value.
The gtag call looks like this:
send_to is the Measurement ID you entered in Totebot, so the event only goes to that GA4 property.
Tracking options
You can turn off either output. Setwindow.totebotTrackingOptions on your page, before or after the embed script:
If you use gtag.js without Google Tag Manager, you don’t need to set anything.
Send events to other tools
The embed script also exposes the events in JavaScript, so you can forward them to any analytics tool. Listen withwindow.totebot.on('event', callback):
window.totebot.off('event', onTotebotEvent).
window.totebot exists once the embed script has loaded. If your code may run earlier, listen for the totebot:event browser event instead. It carries the same object in event.detail: