Skip to main content




Install Google Tag Manager In WordPress it is a must for any serious webmaster or blogger. Learn how to install it in this tutorial CourseWpress.com.

This post may well be the continuation of our tutorial on: how to integrate Google tools into your WordPress. That promises to be a series of tutorials with several sagas.

What is Google Tag Manager?

Google Tag Manager or GTM is a tag management tool that will help you with all the processes related to the Web Analytics.

So with Tag Manager we can easily see data from Google analytics, AdWords, Google Optimize among other measurement tools.

How to install Google Tag Manager in WordPress

The basics

  1. We enter the page of Google Tag Manager through the following link:

https://www.google.com/intl/es/tagmanager

  1. We enter with our google mail and the frequent password. If you are a webmaster serious or a dedicated blogger sure you already have an account of gmail (or two).
  2. When we have logged into the page of Google Tag Manager The next thing will be to create or configure a GTM account (that in case we do not have one already created).
  3. Set up an account Google Tag Manager it's simple. We enter the account name. The country. We push continue.

  1. The next thing is configure container. Here we enter the address of our website.
  2. In our case we press the button website.
  3. We push: create.

  1. Now a new window will appear where we must accept the: Google Tag Manager Terms of Service Agreement and the data processing conditions. We press the button top right: Yes.
  2. By accepting the conditions of service and data treatment, the following is install Google Tag Manager. A window will open that shows us two blocks of code.
  • The first block of code must be pasted on the label of our website in WordPress. The folks at Google Tag Manager recommend that you code as high as possible. In other words, the closest thing to ,
  • The second block of code must be pasted after the tag

We go back to WordPress

  1. For install Google Tag Manager pasting the lines of code that they provide us for such purposes, we return to our desktop WordPress.
  2. We follow the following route: Appearance> Editor. We locate in the section Theme files the following: Theme header (header.php).

It will appear something like The name of your theme: Theme header (header.php).

  1. The first thing will be to paste the code that corresponds to go inside the label . We copy the code. We place the label and we paste it as close to it.
  2. Now we copy the code provided by GTM that must go after . We locate, and paste the code.
  3. We press the button: Update file. If everything went well, we will get a warning: File edited successfully.
  4. We return to the page of Google Tag Manager. We will find a green rectangle: Unpublished container.
  5. To publish our newly created container we must press the button: Send (above and to the right).
  6. Now we must place the data for shipping of the container. We give it a name and a description (optional). Press the blue button for: To post (again, up and to the right).
  7. We wait a few seconds (or minutes depending on your connection) and we will find a page with your website data that says: Version 1 has been released.Version 1 has been released
  8. Clever, we just installed Google Tag Manager in WordPress.

How to install Google Tag Manager in WordPress without code

Install Google Tag Manager in WordPress It is simple, if you follow our tutorial in a few minutes you will get it ready.

And since we like to make your life easier, we always give you another alternative.

In case you need to install the Tag Manager in your WordPress but without touching a single line of code you can use this plugin:

DuracellTomi's Google Tag Manager for WordPress

The Duracell Tomi's Google Tag Manager is an effective tool that will make things (even more) easier for you.

It is a reliable tool. It has more than 100,000 active installations and recent updates. With this plugin you will not have to insert lines of code in Y .

We recommend installing the GTM following the method that we show you in detail. But we do not deny that the plugin Duracell Tomi's Google Tag Manager It is a very useful tool. Fundamentally if you use a theme or framework on your website whose modification is not so easy.

In summary

Whether you activate the GTM via code or via plugin at some point you will ask yourself, how come you didn't activate it before?

Install the Google Tag Manager it's just one step on this long road, you can go on learning with us. For this we have prepared the best online WordPress course in Spanish. What are you waiting for to sign up?

R Marketing Digital