Google Analytics tags migration to Google Tag Manager in a multi-site environment | Articles

Introduction

More than one year ago my colleague Stephane wrote an article about Google Tag Manager implementation basics. As a reminder this tool is a tag management system launched in 2012 by Google. It facilitates every digital marketeers’ lives because it allows to trigger several tags without modifying the source code of your website. Everything is managed in the powerful and user-friendly Google interface.

Today I’m going to explain you how to migrate your classic Google Analytics or Universal Analytics tags to Google Tag Manager in a multisite environment. Nowadays more and more brands are developing several websites : one will be used as branding website whereas the other one will drive leads. In this approach Google Tag Manager has numerous advantages especially in order to give your insights about the online buying process of your users.

Steps

1. Scope definition

First of all it is important to perform an audit of your websites to have a clear and simplified view of the scope of the project. This will allow you to list every tagging elements that are manually implemented in the source code of your website. I’m talking here about events or virtual URL’s pushing information to your Google Analytics accounts. Beyond this I would also recommend you to identify potential stopping elements such as the presence of iframes on your website for instance.

It is also crucial to be aligned regarding the structure of the new GTM account (number of containers, access, naming convention, etc.) and the process of the project. Besides the clear attribution of everyone’s roles I recommend to work in 2 main steps: a first testing phase where data will be sent to a “Test” property (see below) followed by a second migration phase.

Finally you will also have to identify elements in your websites that need Data Layer variables in order to push information through GTM. For example if you have a form where users have to make a choice between your products (or services) without any change in your URL or events triggered, the implementation of a Data Layer variable will allow you to automatically push this information.

2. Creation of new GA properties and GTM container

The second step consists in creating 2 two new properties in GA: one “Test” property and another “Global” property.

The first one will gather the tags of all your websites in order to allow you to check the good implementation of these latter.

The second property will gather the visits on all your websites as well as the conversions datas (event tracking will stay in the specific properties to avoid the multiplication of tags in GTM). This will allow you to follow the navigation flow of your users between your different platforms and then be able to better understand the path to conversion.

Moreover you will create a new container for each website in GTM. The container tag will have to be implemented in the source code (right after the opening <body> tag) of each webpages of the concerning website

3. Creation of the triggers and tags in GTM

Afterwards you will have to create triggers prior to the creation of the tags. The rules of these triggers have to be identical to the ones used in your Google Analytics accounts. They are often based on pageviews, clicks or custom events.

Once your triggers are created you will be able to add new tags in your container by associating them to triggers. Besides events and virtual URL’s tags you will also have to create 2 different “GA ID” tags which will trigger your Universal Analytics (or classic GA) codes. As a reminder the first one will lead to your “Test” UA while the second one will lead to your “Global” UA. In order to ensure cookie transfer on all your websites for your “Global” tag it is important that you add the following parameters:

mathieu1

mathieu2

You will notice that the field “Auto Link Domains” uses the “Cross Domains” variable. This variable - which is also created in GTM - is a “Constant” one and comprises all your websites’ domain names as “Value”.

If your container has a lot of tags from different sources I would recommend you to use a defined naming convention (some best practices here). In addition to this you can also use Folders which is a new functionality offered by Google in order to better structure your GTM account.

4. Tags implementation check via GTM

Once you’ve created all your tags and before you publish them it is necessary to activate the “Preview and Debug” mode. Navigate then on your websites to ensure that your tags are triggered at the right time. You will then be able to create a new version and then publish your changes.

5. Data verification via GA

Before the final migration I would recommend you to take a tour in your 2 new Analytics properties. In your “Test” property you will check if your events and virtual URL’s are well recorded via the “Real-Time” report:

mathieu3

In your “Global” property you will go in the “Behavior Flow” report to check if your UA code is triggered on all your websites.

mathieu4

6. Final migration and monitoring

After these tests in GTM and GA you will be able to proceed the final migration. You (or your web agency) will have to take away all manually implemented Analytics tags. In order to avoid double counting, or a contrario, loss of data you will have to simultaneously replace in GTM the UA code of the “Test” property by the actual UA codes of your websites. In the following days it is essential to closely follow the evolution of GA datas. Indeed this type of migration could have consequences on the evolution of Direct traffic, Bounce Rate as well as Self-Referral traffic (as explained here).

Conclusion

To conclude you will have noticed that this migration process has to follow rigorous steps and that no elements should be left to chance. Nevertheless the implementation of GTM really makes sense in the case of a multisite environment. Besides the fact that it will save you precious time (avoiding back and forth with IT teams), this tool will indeed give you crucial information regarding your users, their navigation flow and behavior as well as the role and importance of your websites in the lead generation.

Author: Mathieu Van Wylick


Tags:

Get in touch

Semetis | Rue de l'Escaut 122, 1080 Brussels - Belgium

welcome@semetis.com

Connect with us

Cookie Policy

This website uses cookies that are necessary to its functioning and required to achieve the purposes illustrated in the privacy policy. By accepting this OR scrolling this page OR continuing to browse, you agree to our privacy policy.