WPLift is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission.

A Guide to Install Google Tag Manager on your WordPress Site & Boost Your Analytics

Last Updated on February 17th, 2023

Tags: , , ,

You’re probably aware that Google Tag Manager WordPress is a fantastic and free tool for managing all of your website’s tracking code. If you’re familiar with editing WordPress themes, you may not know how to install Google Tag Manager on a WordPress site. 

Fortunately, it isn’t too difficult. It will take you less than 10 minutes to complete. You can use Tag Manager to set up Google Analytics, add pixels, monitor events, and more. We’ll show you why Tag Manager is useful and how to use it on a WordPress site.

What is Google Tag Manager?

Google Tag Manager is a free piece of software that lets you add different types of code (tags) to your website. Google Analytics tracking code, Google Analytics event codes, Google Ads conversion script, and remarketing tags are all examples of tags. GTM allows you to add a variety of different types of code to your website, including custom codes.

When it comes to storing and reviewing hundreds of activities, it can be challenging. However, Google Tag Manager solves this problem by storing all of your tags in a single location – your GTM account. 

Imagine Google Tag Manager as a toolbox containing all of your gadgets, such as a ruler (Google Analytics), a hammer (Google Ads), and so on. 

You can also test your tags in Google Tag Manager to ensure that they are triggered when you load the correct page or press a specific button.

Another great advantage is that you can adjust the tags and how they function without having to change the source code of your website (which you might not be able to do due to long release cycles or developers’ busy schedules) – instead, you simply edit tags in the GTM user interface and publish changes with a single click.

Google Tag Manager is divided into three sections: 

  • Tags: Javascript snippets or monitoring pixels 
  • GTM uses triggers to determine when and how to fire a tag. 
  • Variables include: GTM can require additional information in order for the tag and trigger to function properly.

What exactly are tags? 

Tags are code fragments or monitoring pixels obtained from third-party applications. These tags instruct Google Tag Manager on how to proceed. 

The length of time users spend on a page on your web, form submissions, how they arrived on your site, which links they clicked, and even what items they removed from their shopping cart are all examples of necessary tag details for marketers. 

Article Continues Below

Each tag keeps track of a particular item. For example, you could create a tag just to see how many people fill out your “Contact Us” page’s form. The tag will then submit more detailed data to Google Analytics, AdWords, or another third-party service. 

Unfortunately, for marketers without much creation or coding experience, manually coding tags can be a time-consuming and difficult operation, and filling out tickets for the IT department can be time-consuming as well.

The whole tagging process becomes much simpler with Google Tag Manager. All you have to do is inject a code into your site pages once, and Google Tag Manager will code and embed it for you any time you want to create a tag.

Tags that are commonly used in Google Tag Manager include:

  • Universal tracking code for Google Analytics 
  • Remarketing code for Google Adwords 
  • Conversion tracking code for Google Adwords 
  • Tracking code for heatmaps (Hotjar, CrazyEgg, etc…) 
  • Facebook pixels are a kind of pixel that is

What are the benefits of using Google Tag Manager? 

It’s fast and easy

This is true. It is fantastic, but what about Google Tag Manager? 

Let’s proceed with our well-known tags to better understand this. The installation process can be lengthy, repetitive, and technical if you choose to use several of them. 

A sudden desire to add the Facebook pixel, GA tracking code, and Google Ads (formerly Adwords) tracking code takes a lot of time. 

This can be a huge challenge for you. Each time, you’ll need to add the code for the appropriate tracking tag to your WordPress website – or include it in a dedicated plugin, if one exists.

The method is made easier with Google Tag Manager. When you install the tag management system with GTM, you just have to add two pieces of code to your website ONE TIME. 

Article Continues Below

This manipulation helps you to link the Google platform to WordPress, and it’s done with the help of a plugin, which I’ll explain later.

The code does not need to be touched

Then GTM takes over and centralizes it. Without touching a single line of code, you can add, change, and uninstall your tracking tags from the same interface. 

To make it easier, Google Tag Manager uses an automated system to apply the tags to your website for you. And that’s pretty good for a beginner, right? There’s no need to contact a developer any longer! 

GTM supports around fifty tags in total, whether they’re self-made (e.g., Google Analytics, Google Ads, Google Optimize, and so on) or from third-party solutions (e.g. Adobe Analytics, Clicky, HotJar, LinkedIn, etc.). If you know a little bit about WordPress creation, you can even create your own custom tags.

Google Tag Manager is a tool that works in conjunction with Google Analytics

Since they are two free Google resources, we always mix them up. 

What is the difference between Google Tag Manager and Google Analytics, in reality? 

You must realize that they are completely unrelated. To summarize in a few words: 

Google Analytics gives you access to data about your website’s traffic, the majority of which can be accessed through Dashboards. As a result, you have access to statistics (bounce rate, number of page views, etc.).

Article Continues Below

  • Encrypted data is not accessible by Google Tag Manager. It’s not a method for analyzing data. It simply helps you to add tags from third-party tools to your WordPress website from a single interface, without having to touch the file.

These two methods, on the other hand, will complement each other. Google Analytics, allows you to set your own conversion goals to see if your guests are doing the actions you want them to take.

Except that, technically, you’ll need a basic understanding of HTML and, more importantly, you’ll need to add and manage code in your pages for each reason. 

GTM, on the other hand, helps you to do the same thing – and even more specifically – without having to code. And, if you like, you can look up all of the data gathered by your tags on Google Analytics. GTM serves as an intermediary, in this case, sending the data collected on your website (the sender) to Google Analytics (the receiver).

What exactly are triggers? 

Triggers are a way to activate the tag you’ve created. They tell Tag Manager when to do the things you want. Is it custom, or do you want to fire tags on a page view, a link click, or something else?

What are variables, exactly? 

Variables are extra pieces of information that GTM can need in order for your tag and trigger to work properly. Here are some examples of different variables.

broken backlinks

The Google Analytics UA number is the most basic form of constant variable that you can generate in GTM (the tracking ID number).  Those are the very fundamental elements of GTM that you’ll need to understand before you can begin handling tags on your own.

A variable is “a named placeholder for a value that may shift, such as a product name, a price value, or a date,” according to Google. 

A variable is a law that makes it possible for a tag and its trigger to work. In other words, using the “Page URL” variable, you can determine that a particular “tag” (e.g. downloading an ebook) would only be activated on a specific trigger (e.g. “Page display” style trigger) that is specifically placed (e.g. specific URL).

Setting Up Google Tag Manager

It’s a simple two-step method to create a free account, but it’s different from any of your other Google Analytics or Gmail accounts. We’ve recorded our account setup process to make it as painless as possible for you. 

Here’s how you go about it:

Create a Google Tag Manager Account

To get started, first let’s create a GTM account. Go to Google Tag Manager’s official website and create a new Google Tag Manager account.

google tag manager official website

You’ll use the same Google account for Tag Manager as you would for any other Google product. You’ll be automatically logged in to Google Tag Manager if you’re already on Gmail (Google Ads, Google Analytics, etc.). If you don’t already have one, make one.

You’ll be taken to a page where you can register for an account. In a Google Tag Manager form, you’ll be asked to fill in several fields: 

  • Name of the account: Enter the company’s name, for example. 
  • Country: What part of the world do you live in? Put that in there, then. 
  • Name of the container: Your website’s URL should be entered here. For your stuff, the container is a piece of code that will hold all of the tags you build with GTM later on. 
  • Platform to be used: This is the location where the tags will be placed. Online is the best choice for a WordPress website. It’s worth noting that GTM can also be used in mobile applications (iOS and Android). When you’re finished, click the blue “Create” button.
add new account

Copy code and paste it onto every page of your website

You’ll be given codes and instructions to use one code near the top of your page’s head> and the other after the opening body> tag. You can do this right now or wait until later to add the codes to your site (they are accessible in your dashboard). Select “Ok” when done.

install tag manager
  • It keeps your pages’ loading times low. 

Finally, one of Google Tag Manager’s benefits is that it helps you to keep your pages’ loading times as short as possible. 

By default, tags generated with GTM load asynchronously, that is, in parallel with the page load, rather than blocking it.

Set up Tag

The first thing you’ll want to learn after you’ve created a Google Tag Manager account is how to create a tag. 

In Google Tag Manager, you can build an infinite number of tag configurations.

In the Google Tag Manager dashboard, create a new tag. 

Click the “Add a New Tag” icon, which is circled in red below, from your Google Tag Manager dashboard.

add new tag

Set the parameters for your tag

Choose a tag form by clicking anywhere in the top “Tag Configuration” box, then naming your tag.

test tag 1

Select a tag form

Tags come in a variety of shapes and sizes (they are not all displayed here, and you can also customize a tag type). We choose “Classic Google Analytics.”

choose tag type

If you want Google Analytics to monitor your tag, you’ll need to enter your Web Property ID, which you can find in your Google Analytics account. Then choose a “Track Type.” I went with “Page View,” but there are several other choices.

tag configuration

To decide when the tag is recorded, choose a trigger. 

Next, select a trigger (a trigger indicates when the tag should be registered, such as “any time someone visits the page”). I choose “All Sites” to get information any time someone visits one of my web pages, but your needs can differ.

choose trigger2

Save your tag 

Click the blue “Save” button when you’re satisfied with the details in the “Tag Configuration” and “Triggering” boxes.

save tag configuration

Click “Submit” to activate your name

Then press the blue “Submit” button. Until you do, your tag will not fit.

Installing Google Tag Manager in WordPress.

install google tag manager

You’ll be taken to this “Submission Configuration” page after clicking “Submit.” “Publish and Create Version” or “Create Version” are the two choices. I chose “Publish and Create Version” and then pressed the blue “Publish” button in the top right because I was ready to push the tag into all of my site pages.

To keep your tags organized, give them a name and a description

Finally, this “Container Version Description” will be shown. Add a name and a description to your tags to help you remember what you’re trying to document with them.

container version description

Make sure your tag is visible in the “Version Summary” report

submission configuration

How do I know if Google Tag Manager is compatible with WordPress? 

That’s all well and good, but is it really working? 

  • You will find out by using the Preview button on your Workspace. 
  • After that, Google Tag Manager can enter Preview Mode.
now previewing workspace
  • Open or refresh your website’s homepage in a new tab in the same window. 
  • At the bottom of your list, you should see the Google Tag Manager console. This indicates that your tag is ready to use.
tag manager test
  • You can now see information about your website’s page views right in your Google Analytics dashboard. 
  • And I did all of this without touching a single line of Google Analytics code!

Install Google Tag Manager for WordPress

Here’s how you go about it:

Make a copy of your tag code.

During the setup process, you’ll be given a Google Tag Manager code to copy. If you’ve already created an account, go to your Google Tag Manager homepage and press the blue “Google Tag Manager” code next to “Workspace Changes” (circled below in red). You’ll get your Google Tag Manager code from the blue code as well.

google tag manager code

In WordPress, paste the code.

Now copy and paste the code below the body> tag on each page of your WordPress account.

Now you can use Google Tag Manager to generate any tags you like on your WordPress blog. Future tags will be automatically coded and embedded in the page you want using Google Tag Manager.

Wrapping Up! 

Tags are fragments of job descriptions found on a website. Tags gather data from the page, your website’s data layer, and your browser, as well as user information. This data is translated into requests, which are then distributed to various locations. 

All of your conversion monitoring, marketing campaigns, analytics, and more are driven by this method. 

Your digital marketing activities will be more effective with Google Tag Manager, and you will be able to monitor all of your efforts. Google Tag Manager will help you save time and resources while also increasing the efficiency of your digital marketing activities. Setting up this tool on your WordPress site requires some effort, but it pays off handsomely. Consider how Google Tag Manager will help you monitor your progress as you broaden your digital marketing efforts.

You’ve learned how to install Google Tag Manager on WordPress, as well as its advantages and how it functions, in this article. Google Tag Manager is a free tag management tool that lets you manage several tracking tags at the same time. Not only that, but the device can monitor user activity and conversions, as well as generate analytics for digital marketing! We’ll see you on the other side!

A team of WordPress experts that love to test out new WordPress related software, WordPress plugins and WordPress themes.