Configuration of your GTM account

We recommend you to use Google Tag Manager to use our cookie solution. This way, you won’t need to touch the code anymore! Simple and super effective!

What’s the Google Tag Manager?

The Google Tag Manager is a tag management system created by Google to manage JavaScript and HTML tags used for tracking and analysis on websites. For example, to know your Facebook conversions and make advertising retargeting you need to add a tracking pixel on your website.

With its very clear and simple-to-use interface, you’ll save a considerable amount of time to add your tags thanks to this tool. You only need to add the Google Tag Manager code once and then manage all the other tags directly in GTM.

-Tags: This is a piece of code that allows you to add any type of JavaScript to your website. (tracking code, conversion pixel…)

For example:

  • Indicate a page viewed in Google Analytics

  • Indicate a conversion to Adwords

  • Add a Facebook tracking pixel

-Triggers: This is how the tags will be used on the website. Triggers associated to a tag define the condition under which a tag is triggered or not.

For example:

  • Each time pages are loaded

  • When a purchase is made

  • After a visitor has stayed 5 minutes on a page

Create a GTM account

Start by creating your account by going here, as the GTM is a Google product, you can connect with your usual Google IDs.

Add your account by giving it a name, then indicate the name of the container which is the address of your website. You’re then asked where to use the container, if you have a website or a blog you must select “Web”, while IOS and Android will be reserved for applications. Make “Create” and accept the terms of use.

The Google Tag Manager then directly gives you a code. This HTML code must be added on your website, it’s the only coee you’ll have to add, because then you’ll go through the Google Tag Manager which will add your tags.

Add a HTML code

  • Add the code by yourself: If you know a little bit about code, you can choose to add it by yourself. Copy the first code and insert it in the <head> section of the page. Then the second one after the opening tag in <body>.

  • Go through a plugin to add the code: Wordpress: If you have a wordpress website and that for you, the code is a language from elsewhere, there’s a plugin that allows you to add it very simply in one click: Duracell Tomi’s Google Tag Manager for WordPress

Go to WordPress, click on “Extensions”, “Add”, enter the name of the extension in the search bar on the left, then click on “Install now”.

Copy your GTM code, you’ll find it on the GTM workspace (home page) or by clicking on the blue diamond on the far left.

All you have to do is place your HTML code in the “Google Tag Manager ID” box. You can select “Codeless injection” but make sure that your website is displayed correctly, then click at the very bottom on “Save changes”. If not, check “Footer of the page”.

Create your tags

Once your Google Tag Manager HTML code is online on your website, you’ll be able to create your tags.

-Tag: The first tag we’ll create will be for Google Analytics. To create a tag, it’s very simple: First, click on “Add a tag”.

Then configure it by selecting the type of tag you want, here in this case we’ll choose “Google Analytics (Universal)”.

In our case, we want to track the traffic of all pages, so we select the pages viewed ofr the “Tracking Type”.

Then you must connect your Google Analytics account, for this purpose, go to “Google Analytics Settings” add a variable and specify the Google Analytics tracking ID.

-Triggering: Once you’ve added the code, you must control when it’ll be triggered by selecting a trigger. There are 6 types of triggers:

  • Viewed Page (Web)

  • Clicks (Web)

  • Sending a form (Web)

  • Modification of the history (Web)

  • JavaScript error (Web)

  • Timer (Web)

  • Customized events (Web and mobile)

First, click on the pencil in front of “Trigger”. In our case, we want the tag to be triggered when a page is displayed in a user’s browser, so we choose “Viewed Page”. Click on “Save” at the top right. Once created, you can modify or delete it by clicking on it, then on the pencils or on the 3 small dots at the top right.

Important: If you’ve already placed a Google Analytics HTML code, you must delete it, otherwise it’ll appear twice, and this will completely distort your results.

Don’t forget to click on “Send” to publish your tag on your website.

Congratulations! You’ve just published your first tag! All you have to do now is do the same thing with your other tags.

Create a customized tag

In the second example, we’ll see how to add a Facebook tracking pixel on your whole website. This is a piece of code that’ll allows you to measure the conversions of your ads. When you add this pixel to your website, you can see what conversions have been made, who clicked on your ad… This allows you to retarget your ads, targeting people who already have visited your website.

There’s no Facebook tag in the GTM, so we need to create it. As before, you click on “Add a tag”, “Configure tag”, and then “Customized HTML”.

If you’ve never used the Facebook tracking pixel before, here’s where and how to find it: Go to the Facebook ad manager, click on “Tools”, then “Pixels”, “Configure pixel” and “Copy/Paste code”

Then copy/paste your Facebook HTML code into the text box. Once again, I want this code to be on all pages, so I select “All Pages” as a trigger. Then you can click on “Save”.

And finally give it a more appropriate name like: “Facebook pixel all pages”

That’s it! You’ve just added your Facebook tracking pixel to your website.

Add a rule

What is a rule? A rule is to add a timer and make a tag appear only after a certain time. To do this, click on “Add a tag”, “Configure tag”, then “Customized HTML”, and paste your Facebook tracking code. Then you’ll have to create your own trigger. Click on it, then select the “+”, then the pencil, and finally “Timer”.

Fill in the different boxes.

Interval: Be careful, it’s milliseconds, so for example for 2 minutes you must type 120 000 Limit: One time, since we want the timer to be triggered only once.

Then you choose the page on which you want the timer to be triggered. Select: “URL page”, “Begins with”, “The link of your page”, click on “Save” and rename the trigger. Your customized trigger is created so you can “Save” and rename the tag.

Once you’ve finished adding your tags, click on the button at the top right: “Send”. Add a name and description and click on “Publish”.

Thanks to the website SocialMediaPro for this complete tutorial!

Last updated