Google Tag Manager setup guide
PART 1: Setting up Google Tag Manager
Creating a Google Tag Manager account and container
If you are new to Google Tag Manager, follow the steps below to create a new account and your first container. Usually, one account is just enough as all tags for all your company’s websites can be managed using a single GTM account.
Follow the steps below if you need to create a new account:
1) Sign in to your Google account.
2) Go to https://tagmanager.google.com/ and click Create Account.
3) Enter an Account Name, select your Country, enter a 'Container Name' and select 'Web' as the target platform. 4) Click 'Create'.
5) Read through the GTM Terms of Service, click the checkbox to accept and 'YES' continue.
You will then be provided with two sets of code, which you need to add to the pages of your website.
Once the codes are added, continue on with the below.
Update settings in LeadChat portal
Your account manager will need to activate GTM for your account.
They do so by pasting the below code to the 'Conversion code' field in Settings.
dataLayer.push({'eventCategory': "Lead",
'eventAction': "Captured",
'eventLabel': "Chat Lead",
'event': 'chat-lead'});
Configuring Tags in GTM
1) Log into your GTM account and click on "Add a new tag"
2) Click the pencil to edit the Tag Configuration.
3) Choose the "Google Analytics: Universal Analytics" option.
4) Choose "Event" from the drop down Track Type list.
Complete the Event Tracking Parameters
5) In the 'Category' field, click on the + button, then on the Choose a variable page click the + in top right to create new.
6) Click on the Variable configuration to edit, then select 'Data Layer Variable' as the variable type.
7) Enter the Data Layer Variable Name as 'eventCategory'
8) Click save with the same name you just used.
Repeat steps 5 to 8 for the Action and then the Label field. Name these variables 'eventAction' and 'eventLabel' respectively.
It should now look like this:
Link this new tag to your Google Analytics account
1) In Google Analytics Settings choose 'New Variable...' from the dropdown
2) Enter your Tracking ID in the format UA-XXXXX-X]
3) Click 'Save'.
Set up Triggering
1) Click on the Triggering section to edit, then click the + to add a new trigger.
2) Click on the Triggering Configuration section to edit then select 'Custom Event'
3) Enter the Event name as 'chat-lead' and click Save.
4) Rename the trigger to 'Chat Lead' and Save.
It should look like this:
5) Finally click Save to finish editing the tag.
6) When prompted, name the tag 'UA Event - Chat Lead'.
7) Then click Submit and Publish to save the changes.
Congratulations you are all set up with tag manager! You can now track your results in Google analytics.
PART 2: Reviewing results in your Google Analytics dashboard
Finding results in GA
The information about how many leads were captured through the chat window can be found in the Behavior tab under Events > Top Events.
1) The count of leads from chat window is the number of unique events for EVENT CATEGORY: Lead » EVENT ACTION: Captured » EVENT LABEL: Chat Lead.
2) If you want to know the sources, that drove leads, apply secondary dimension: source / medium.
3) The report will look like below:
4) You can also use our pre-built custom report to see leads from chat window per day, per traffic source/medium. Use this link to apply it to your own property:
Send information about leads form chat window into other systems.
If you are using Google Tag Manager for conversion tracking of other systems besides Google Analytics (for example Adwords, Facebook Conversion Pixel, Twitter Conversion Pixel and etc.) add previously created trigger “Lead - chat-lead“ as a firing rule for the conversion pixels. Note below the example of an Adwords Conversion Pixel.