Relio automatically tracks key visitor interactions and pushes them to multiple analytics platforms. No extra setup is needed. If you already have Google Tag Manager (GTM), Google Analytics 4 (GA4), Microsoft Clarity, or Klaviyo on your website, Relio sends events to them automatically.
Every event is prefixed with relio_ and pushed to window.dataLayer. You can use these in GTM to create triggers, conversions, or custom audiences.
| Event Name | When It Fires | Data Included |
|---|---|---|
relio_ready |
Widget loads on the page | widget_id |
relio_chat_open |
Visitor opens the chat window | widget_id |
relio_chat_close |
Visitor closes the chat window | widget_id |
relio_message_sent |
Visitor sends a message | widget_id, message_length |
relio_view_item_list |
Product recommendations are shown | widget_id |
relio_link_click |
Visitor clicks a product link | widget_id, url, product_title |
relio_add_to_cart |
Product added to cart (Shopify/WooCommerce) | widget_id, product_id, product_title, platform |
relio_lead_captured |
Visitor submits a lead form | widget_id, lead_tag |
window.dataLayer and press Enterrelio_ready in the arraywindow.dataLayer again to see relio_chat_openAll product links in the chat are automatically tagged with UTM parameters:
utm_source=relio.chatutm_medium=ai-chatutm_campaign={your_chat_key}This lets you track Relio traffic in Google Analytics under Acquisition > All Traffic > Source/Medium. You will see relio.chat / ai-chat as a source, making it easy to measure how much traffic and revenue your AI assistant drives.
Relio detects and pushes events to these platforms automatically:
| Platform | How It Works |
|---|---|
| Google Tag Manager / GA4 | Events pushed to window.dataLayer. Create triggers in GTM for any relio_* event |
| Microsoft Clarity | Sets relio_user = true tag and fires Clarity custom events for each interaction |
| Klaviyo | Pushes events via _learnq.push() with event name and data properties |
| Custom JavaScript | Listen for CustomEvent on window (e.g., window.addEventListener(\"relio:chat_open\", ...)) |
For advanced integrations, you can define callback functions on window.relioSettings:
<script>
window.relioSettings = {
onChatOpen: function(data) {
console.log("Chat opened!", data);
},
onMessageSent: function(data) {
console.log("Message sent, length:", data.message_length);
},
onLinkClick: function(data) {
console.log("Product clicked:", data.product_title);
}
};
</script>
Place this script before the Relio embed code. Hook names follow the pattern on + camelCase event name (e.g., chat_open becomes onChatOpen).