See our other products: ChatBot - AI bot platform | - support ticket system | KnowledgeBase - help center for website

Help and support

Resources that will teach you everything about LiveChat.

Google Analytics: storing LiveChat data

by Jacob Firuta

Using our Google Analytics integration, you can easily collect live chat related data and log it in on your Google Analytics account.

Live chat events in google analytics

Give it a go to learn more about your visitors browsing habits and make use of all the valuable data gathered.

Data usage

LiveChat and Google Analytics integration is based on GA Events. When a visitor performs an action related to an interaction with LiveChat, the data is pushed to your Google Analytics account via the Analytics JavaScript.

Events are being passed with Category, Action and Label attributes – each corresponding to different information. This integration can collect the following information:

  • the number of sent automated greetings
  • the number of displayed pre-chat surveys
  • how many pre-chat surveys were submitted
  • the amount of chats you had
  • the number of post-chat surveys displayed
  • how many post-chat surveys were submitted
  • the number of ticket form views
  • how many ticket forms were submitted

This integration doesn’t collect any personal data of the visitor.


Follow the instructions below to set-up the integration on your live chat:

Google Analytics integration is enabled for all trial accounts – if you have just signed up for a free trial, feel free to skip this step!
  1. Go to the Google Analytics integration page and click on the Install application button.
Installing the Google Analytics integration
  1. Proceed by clicking on Install.
Proceeding with the installation of Google Analytics integration
  1. You will get a notification that the app was installed successfully.
Successful Google Analytics app installation

From now on, the aforementioned information will be tracked in your Google Analytics as events.

Make sure you have both the LiveChat tracking code and Google Analytics tracking code installed on your sites in order to log all the information coming from LiveChat to your Google Analytics account.

Using Google Analytics with Google Tag Manager

If you plan to use the Google Tag Manager integration, you need to configure a couple of additional settings to make sure that various events are recorded correctly.

Learn how to integrate your Google Tag Manager with LiveChat to properly record on-site events.

Using several versions of the Google Analytics code

If you are using several different versions of the Google Analytics code, you can let LiveChat know which version to use for the integration.

You can do that by adding the following parameter to your LiveChat tracking code:


Depending on which instance of the code you want to track, you can use the following values for the parameter: "pageTracker | urchinTracker | gtm | gaq | ga". After selecting the values to track, place the additional piece of code in your LiveChat tracking code.

The parameters stand for:

gtm – Google Tag Manager
gtag – Global Site Tag (gtag.js);
gaq – ‘traditional’ asynchronous code for Google Analytics
ga – Universal Analytics

Here’s an example LiveChat tracking code with the additional parameter added:

<script type="text/javascript">
	window.__lc = window.__lc || {};
	window.__lc.license = XXXXXXX;
	window.__lc.ga_version = "ga";

	(function() {
		var lc = document.createElement('script');
		lc.type = 'text/javascript';
		lc.async = true;
		lc.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + '';
		var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(lc, s);
Feel free to copy the example above and use it on your website – just remember to replace the XXXXXXX with your own license number!

Both your code and your license number can be found at Settings > Installation > Chat widget section of your LiveChat.
Did you find this helpful? Yes No
Thanks for your feedback.
61% of people found this helpful.

Start free LiveChat trial!

5-minute setup, test out the Team plan features for 30 days, no credit card required.

Rate us! Rate this chat to help us become better support. +