The Chat Widget can be embedded across your funnels, websites, WordPress sites, and third-party platforms like Shopify, Wix, and Squarespace. By connecting it to Google Analytics 4 (GA4), you can monitor how visitors interact with the widget, and inside your account you can see which traffic source brought in each conversation. This guide covers both: GA4 event tracking and web chat attribution.
GA4 tracking lets you capture user interactions with the Chat Widget so you can better understand visitor behavior and engagement, no matter where the widget is embedded.
Enhanced patient insights: Monitor how visitors interact with the Chat Widget to refine your engagement approach.
Performance monitoring: Identify and address potential issues in the chat experience.
Data-driven decisions: Use analytics to make informed decisions about your chat functionality.
Seamless integration: Combine Chat Widget and GA4 scripts without conflicts.
Make sure Google Analytics 4 is already installed on the site or funnel where your Chat Widget will appear. No additional configuration is required for the Chat Widget to send events to GA4.
This applies to all platforms, including your own sites and funnels, WordPress, Wix, Shopify, and others.
You do not need to install GA4 separately for the widget to work.
Follow the structured setup below to install GA4 tracking, embed the chat widget, and begin capturing custom analytics events related to widget usage.
Embed the GA4 global site tag code in the <head> section of your webpage, or in a Google Tag Manager (GTM) Custom HTML tag.
Key notes:
This script loads the GA4 library and initializes it using your GA4 measurement ID.
The dataLayer is used for storing events and sending them to GA4.
Insert the chat widget snippet in the <body> section of your site to load the widget. Click the Get Code button, then navigate to the Via GTM section to find this snippet.
Attributes breakdown:
data-widget-id: Unique identifier for the widget.
data-location-id: Corresponds to your business account.
Paste the GA4 custom event tracking script below your chat widget embed to enable event tracking for widget interactions.
Understanding what each event tracks helps you validate and use the data more effectively in GA4.
Event Name | Trigger Condition | Category | Label |
|---|---|---|---|
widget-open | When the widget is opened | Live Chat | Widget Open |
widget-close | When the widget is closed | Live Chat | Widget Close |
form-submit | When a chat form is submitted | Live Chat | Form Submitted |
Use these techniques to confirm your event tracking is set up correctly and working in real time.
Google Tag Assistant extension: Monitor events as you interact with the widget.
GA4 DebugView: Track real-time events in your Google Analytics dashboard.
Network logs: Use your browser DevTools, then the Network tab, to verify event payloads.
Live test: Open, close, and submit the chat form to validate the respective events.
When a contact starts a conversation through the Live Chat widget, your account records the traffic source (Organic Search, Direct Traffic, and so on) so you can see how that person found you.
When a contact initiates a conversation via the Live Chat widget, that event appears in the Activity tab on the Contact Detail page in Contacts.
Clicking the clipboard icon opens the form submission (the initial message they entered into the Chat Widget), where you can view more information, including the source such as Organic Search or Direct Traffic.
You can also view the traffic source for conversations initiated through the Live Chat widget. Go to Marketing > Form Builder > Submissions tab, then select Widget Form from the Chat Widget section of the Form Selector dropdown.
Note: Attribution works for Live Chat Widgets you have added to external websites, including sites using the WordPress widget. Attribution may not work for some iOS users, or any users who have privacy mode turned on, because it blocks the cookie.
Will this track visitors across all pages?
Yes, as long as the widget and tracking script are embedded on those pages.
Can I customize the events tracked by the Chat Widget?
Currently, the Chat Widget tracks a predefined set of events. Custom event tracking is not supported.
Where can I view the Chat Widget events in GA4?
Navigate to the Events section in your GA4 property to view the tracked Chat Widget events.
Do I need to install GA4 separately for the widget to send events?
No. As long as GA4 is already installed on the site or funnel where the widget appears, no additional configuration is needed for the widget to send events.
Will attribution work on non-native websites?
Yes. Attribution works for Live Chat Widgets added to external sites, including those using the WordPress widget.
Why is the traffic source missing for some conversations?
Attribution relies on a cookie. It may not record for some iOS users or anyone browsing with privacy mode enabled, since that blocks the cookie.