Google Analytics 4 (GA4)
This guide explains how the Octocom chat widget sends events to Google Tag Manager (GTM) and how you can use them in Google Analytics 4 (GA4) for reporting, funnels, and conversions.
1. How the integration works
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "UserAction",
eventCategory: "Octocom Chat Widget",
eventAction: "Open" // or "Close" / "Send Message"
});2. Prerequisites
3. Events sent by the chat widget
3.2 Chat Open
3.3 Chat Close
3.4 Send Message
4. Configure tracking in Google Tag Manager
4.1 Create a Custom Event trigger
4.2 Create GA4 Event tags
5. Using events in GA4
5.1 Track chat engagement
5.2 Conversation funnel
5.3 Mark conversions
5.4 Build custom reports
6. Using events for other tags in GTM
7. Enhanced event tracking (optional)
8. Technical notes
Last updated