23 March 2018 Reading time: 4 minutes

Pavel Karpovskii

Head of Marketing

Google Analytics and BILLmanager part 3. Moving GA counter to Google Tag Manager

ISPSystem
Moving GA counter with User-ID tracking to Google Tag Manager

Let’s continue the story about using Google Analytics in everyday work of a provider. From the first part of the article, you have learned how to transfer sales data from BILLmanager to GA and correlate depersonalized data of the website’s visitors with actual users in the billing. The second part gets you familiar with the main scenarios of using GA when you provide hosting services. In this part I will tell about the Google Tag Manager: why do you need it, how to use it and how to install GA on it.

What is Google Tag Manager

Google Tag Manager is a free tool for managing 3rd party tags on a website. At the start, a tipical provider has 2-3 tags of this type on his website — an analytics counter and a chat. However, their number will grow eventually:

  1. additional analytics counters,
  2. callback services,
  3. remarketing tags of facebook / twitter / instagram,
  4. a vast number of widgets.

In order to install any tag, it is necessary to edit the code of a website. It is a time-consuming procedure and it’s not convenient sometimes. Google Tag Manager helps to solve this issue. Marketing specialists can install most of the tags by themselves, while webmasters don’t need to worry about their normal work and potential conflicts.

Installing Google Analytics in Google Tag Manager with User-ID tracking

Step 1. Create a new Google Tag Manager.

Step 2. Now let’s proceed with creating the Google Analytics tag. This is a default tag and it is available in a box-version of Google Tag Manager.

Step 3. Choose Page View for a  Track Type  and New for a  variable .

Step 4. Enter the counter’s code into the  Tracking ID  field. I want to remind you that you can copy the code from the left upper corner of Google Analytics counter, just click on a view name. Leave auto for  Cookie  settings.

Step 5. Open  Advanced settings  Fields to Set . and add the following fields:

  1. allowLinker — set "true" as a value,
  2. userId with a variable value {{UserIDCookie}}. This field is responsible for User-ID tracking. I will describe it in details further.

Step 6. Check the boxes for banner ads - Enable Display Advertising Features. Do the same for Enhanced ecommerce features in  Ecommerce  section and activate Use data layer.

Step 7. Save the settings to make it available for choosing.

Step 8. Choose All pages at  Firing Triggers  and specify Page view as a type.

Step 9. Done!

Step 10. Now we need to paste the Google Tag Manager code in onto your website according to the instruction. Don’t forget to delete an old Google Analytics code. If you installed the script according to the first part of our article it will be easy for you to find the old code.

Step 11. In my case, I need to go to the  WordPress theme settings , add the script to the header and apply changes.

Step 12. Go back to the  settings of Google Tag Manager  and publish our tag. Give a name to it and describe container version.

Step 13. Let’s check how it works now! Open the website and Google Analytics in separate tabs. After a few seconds, you should see at least one active session in "real-time" block.

Yandex.Metrika and other tags

For the tagов not available in Google Tag Manager by default, the most widespread tag type is a "user TML". For example, if you want to install Yandex.Metrika tag on your website you need to create a new tag, choose "user HTML", paste the script from the settings of Yandex.Metrika and leave All Pages as a trigger.

 

That’s it. I hope this article will be helpful for you.