How to use Google Tag Manager

10 mistakes that end with engagement on your Facebook
7 items you may know with the Facebook Stats part

Here at Digital results, we the growth team are always doing experiments on the site, such as A / B testing, and using new tools to leverage our results with Digital Marketing .

It turns out that many of these tools require code installation on certain pages of the site and for many marketers, this requires the support of a developer, which may delay the actions of Marketing and hurt the company’s results.

We know that this scenario is part of day-to-day life of many people who work with marketing and to gain flexibility and agility in this process, we chose to use Google Tag Manager (GTM), a free Google tool by which only you put a code on the site and, from there, installs various services without touching the code more.

By centralizing all key management in the GTM, the Marketing team wins autonomy to work, which improves productivity and reduces IT costs. Also, if you already use a large number of tags on your site, to exchange them for the unique tag GTM, site performance will also improve.

In this post we will teach an introductory way how the Google Tag Manager and show some common use cases, we use ourselves. If you already know the GTM and want to deepen, Google itself provides course certified in the subject (in English).

How to create and install the GTM

To get started, visit Google Analytics .

On the first screen, Google will ask you to create an account on GTM (Google Tag Manager).

The form of management of GTM accounts will depend on you. Here at Digital Results have an account for the company and, in this regard, different containers for different sites, as we will explain later.

Put your company’s name and press continue:

The next step is to create the first container. A container is where we will set up and hosted all other code that will be in your Tag Manager.

Put a name to identify it (can be a name or the company’s own domain, if you prefer), select Web, as this is where it will be used and create.

Here at Digital results we have one container for each site. One for the main site, another site for the RD Station (our Digital Marketing courses and events such as the RD Summit .

After accepting the terms, you will have come across the code that must be installed on every page you want:

As previously mentioned, one of the great benefits of GTM is no need to ask for help from a developer whenever you need to add a new code. It turns out that the Tag Manager has its own code. Send this code to install a developer or yourself, if you know. This is the only (and maybe last) time you need to enter the code in HTML.

It is important to remember that the code should be added immediately after the opening <body> in HTML, every page you wish.

After installation, you need to add tags to the container. We will give some examples throughout this post.

After you add these tags, you must publish the container so that it passes the load on the site the tags that you added. I remember that every update of container tags, you must republish it so that there is effect.

To add tags to the container, click the green box on the right or on the left menu:

GTM itself will already suggest some tags, but you can add others as needed heading “Custom HTML Tag”. Do not forget to name the tag.

How to install Google Analytics on GTM

The GA is probably the first tool that any company needs to install in order to begin to analyze traffic and visitor behavior on the site. Do this within the GTM is very simple, starting with a click on the “Tags” menu on the left side of the screen and then click “New”.

How does Google know that  Google Analytics and some other tools are part of the basic arsenal of all marketers, most of them are already pre configured.

Just select Analytics from the options that appear and indicate whether you are using the Universal Analytics or classic version of the tool.

If you do not know which Google Analytics version your company is using, see this article in the Google help center .

That done, you need to tell GTM what your domain ID (Web Property ID). There are several ways to find this identifier, but our statement is, after logging into your Google Analytics account, enter the “Administrator” menu at the top, then enter the “property” in question and click “Property Settings”.

In the fourth and last point you will only choose which tag the pages will run. In this case, we want Google Analytics to monitor our entire domain, just click on “All pages”. In the end, your page will be set more or less like this:

There, the tag is already installed. To put it to work now just click “Publish”. This will activate your container with all the tags you’ve added.

Installing the remarketing code Facebook and Google AdWords in GTM

  • Remarketing is a very good thing because it displays ads for those who have visited certain pages of the site.
  • There are several tools and each calls for a different code
  • Using GTM, it is easier to install and make changes without asking for a developer

Follow the tutorial below

You can install or remarketing pixel codes by creating from creating a tag for each function, that way you organize each TAG stating that each is a different code. With this draw or pause is an easier action.

Entering the TAG Google Adwords Remarketing code

Select the product ” AdWords ” and select the tag type “AdWords remarketing” and set the tag, you need to put the number of Google Conversion ID.

Find the Conversion Code / Remarketing:

  1. Log in to your AdWords account at
  2. Click the Campaigns tab.
  3. In its campaign list on the left, click Library and shared public.
  4. Click the “Tag Details” button after “Settings” and finally on “Show Google Adwords tag for websites” .

In the code box, the number after ” var = google_conversion_id ” is the code Remarketing / Conversion.

Now enter your Google AdWords Remarketing code as the image below:

In the last step, you need to indicate where you want to trigger the code to work the AdWords remarketing tag. You can put in all the pages (as the picture below), select which pages you want to collect Remarketing information when the user clicks on a link in specific page or form.

After clicking “Create tag” you created the tag and need to click the “Publish” button to validate and get on your site.

Entering the TAG Facebook Ads Retargeting code

The process is very similar to insert Google AdWords mentioned above, you select the product as “Custom HTML Tag”.

To set up the tag, you must copy the code from your custom audience in Facebook Ads.

Find the code Retargeting Facebook Ads:

  • Access the manager of Facebook Ads and select “Tools> Public” or click this link to go straight
  • Select your Pesonalizados Public list or if you have not yet create by clicking the “Create public” and “Traffic on the site” that way you will create a list of people visiting your site or viewing specific pages.
  • After selecting, click the “Actions” button and “Display Pixel”

Copy the code shown and place in the “Setup” tag in Google Tag Mananger.

Installing other scripts in GTM

Same show to the Facebook remarketing code also applies to other tools.

Having the container installed GTM, it becomes easier to also install other services that are of great use for marketing. Some of these services are:

  • Analysis tools such as Analytics Heap, KISSmetrics, ClickTale and Crazyegg;
  • Tools for A / B testing, as Optimizely and own Google Analytics (specific code for this type of test);
  • Tools exit-intent and other capture and email features such as Optinmonster and Picreel

To install a script in any GTM, first create the account on the service you want to install, take the code provided by this service, create a new tag in GTM and choose Custom HTML tags:

Add your code on the next screen and go forward.

It is important to remember to apply the container any changes you make to it.

If you want to know more Digital Marketing tools interesting for your company, please read eBook Digital Marketing Tools .