How to Set up Google Tag Manager on your WordPress Website

Create a Google Tag Manager Account

this topic might sound way too basic for some of you, remember that there are nuances you should keep in mind. In this blog post, I’ll describe several ways how to install Google Tag Manager on a website, highlighting the pros and cons of each option.

Just in case you haven’t done this, first, you should create a Google Tag Manager account and a container.

Create a Google Tag Manager Account

To get started, first let’s create a GTM account. Go to Google Tag Manager official website and click the main call-to-action in order to create a new Google Tag Manager account.

how to install google tag manager

Just like with any other Google’s product, you will use the same Google account for Tag Manager. So if you’re already on Gmail (Google Ads, Google Analytics, etc.) you will be automatically logged in to Google Tag Manager. If not, create a Google account first (I will not show that procedure, so you’re on your own here  ).

Once you log in, you’ll be asked to create a new Google Tag Manager account and a new container.

how to install google tag manager

Google Tag Manager account works the same as the Google Analytics account, usually, it’s for a company/business/client, while a container is usually for a website or application. A single container can contain many tags, triggers, and variables.

However, if there are several websites that belong to a single business and their structure is very similar (plus, their tracking implementation is similar), feel free to use one container on multiple websites. I have written more about this topic here.

Where can I find the Google Tag Manager code?

Google Tag Manager provides you with the exact code and instructions where to add it to your website. There are two places where you can find it:

  1. By clicking container ID (located next to Publish and Preview buttons)
    container code next to publish button
  2. Or by going to Admin > Account > Container > Install Google Tag Manager
    how to install google tag manager

Any of these options will open instructions on how to install the Google Tag Manager code on your website + the code snippets that you must add to a site.

how to install google tag manager

Add Google Tag Manager container code to the website

Follow the instruction and place the first code (which is surrounded by

If you don’t possess coding skills, this work should be done by a developer (because just blind copy-pasting will not work). There must be some logic written that adds actually dynamic information to the dataLayer (e.g. if a user logs in, his/her actual customerType should be added to the Data Layer.

Data Layer is not an easy concept to grasp on for beginners. So if you are confused in this chapter, don’t worry. Everyone was. Here are some additional resources for you to read to get more familiar with it:

Frequently Asked Questions

So I’ve described what the perfect and recommended scenario looks like: