Google Analytics Tracking for HubSpot Chat

Category : Knowledge Share

HubSpot doesn’t offer a Google Analytics integration that allows for tracking chat interactions as Events. A HubSpot Community thread has been asking for a solution here to years.

A few users have offered instructions for doing this via Google Tag Manager, but it took piecing together a few separate comments to build a semi-reliable solution. It’s not perfect due to HubSpot limiting the interactions recorded by their chat tool, but we’re now able to send the following events to Google Analytics.

Category = HubSpot Chat
Action =
Closed – Welcome Message = this means the user closed a pop-up text bubble that displays the chat’s welcome message
Opened – Window = user clicked to open the chat
Closed – Window = user clicked to close the chat
Conversation Started = user answers yes / no to the automated question initially shown in the chat or enters a typed response
Label = something passed along via HubSpot’s API called a “uuid”. I was not able to verify what this actually is. I’m assuming it’s a user id from HubSpot that is tied to each chat conversation but refreshes with each pageview.

https://community.hubspot.com/t5/Reporting-Analytics/Hubspot-Chat-Tool-Recording-Conversions-in-Analytics-Adwords/m-p/293480/highlight/true

https://community.hubspot.com/t5/Reporting-Analytics/Hubspot-Chat-Tool-Recording-Conversions-in-Analytics-Adwords/m-p/421619/highlight/true