Google Analytics 4 integration with Provide Support live chat allows tracking the following metrics:
There are two ways to integrate Google Analytics with Provide Support live chat:
In this article we will cover both methods.
Direct live chat and GA4 integration is easy and straightforward. You only need to get your data stream Measurement ID in the GA4 property Admin and enter it into your Provide Support account settings:
GA4 will start tracking chat window loads, initiated chats and sent offline messages immediately.
Learn more about tracked events further in this article.
Integration via GTM is more tricky and will require some GTM configuration skills. You will need to create custom triggers and tags to catch custom live chat events with GTM and send them to GA4. You will also need to add additional parameter to your GA4 Configuration tag if your chat window is embedded into your website.
Find below step-by-step instructions for each integration stage.
ps_live_chat_started
as the Event NameCustom event - chat started
ps_live_chat_offline_message_sent
event and save it with some meaningful name as well (e.g. Custom event - chat offline message sent
). Now you have two triggers that will catch custom events fired by your chat window. It's time to send these events to GA4. You'll need to create two tags for this.
Let's start with the tag sending an event when a chat is initiated.
ps_live_chat_started
on this step ps_live_chat_started
eventGA4 Event - live chat started
ps_live_chat_offline_message_sent
event and save it with some meaningful name as well (e.g. GA4 Event - live chat offline message sent
). Now you have two tags that will send custom events to your GA4.
If your chat window is opened as a popup window, you can finish the setup now by submitting configuration updates to GTM. After this GTM will start catching events fired by your chat window and will send them to GA4.
But if your chat window is embedded into your website, you need to update your Google (former GA4 Configuration) tag.
When chat window is embedded into your website, it's considered to be a third-party content. Default GA4 configuration won't work with it as it works with first-party content only. So you need to explicitly allow GA4 working with a third-party content. For this you need to add cookie_flags
parameter with value max-age=7200;samesite=none;secure
to your GA4 configuration.
When the direct live chat and GA4 integration is used, we add cookie_flags
parameter automatically and you don't need to do anything.
But in case of GTM integration, you need to pass cookie_flags
parameter to your Google Analytics via its GTM configuration tag. For this do the following:
cookie_flags
as Configuration Parameter and max-age=7200;samesite=none;secure
as ValueThe easiest way to check your chat events is to use Reports / Realtime view.
Both custom events have all default event parameters such as page_location or page_referrer. page_referrer will help you to determine the pages where your chat is opened most frequently. And page_location may come in handy if you track several chat accounts in one GA4 property.