Connect with us

Tips and Guides

How To Install Google Tag Manager On WordPress

Published

on

How To Install Google Tag Manager On WordPress

Installing Google Tag Manager on WordPress can be a little tricky, much less, actually figuring out why you would want to install Google Tag Manager and what are the benefits. In general, we recommend installing Google Tag Manager on a new WordPress site if you think you’ll be doing a lot of tracking tags in the future.

There are a lot of articles out there that are a bit hard to understand so we are going to try to stick to the basics and show you the easiest way to install Google Tag Manager to WordPress. All of the installation process will be done in the WordPress dashboard or within Google accounts.

In our guide, we’ll talk about how to install Google Tag Manager, as well as how to combine your Google Analytics tag with Google Tag Manager for the optimal setup on your WordPress site. Our guide shows you how to add Google Tag Manager without having to touch any code snippets.

What Is Google Tag Manager?

To explain the biggest benefit simply: Google Tag Manager exists so that you only have to edit your source code one time for the initial install of Google Tag Manager in order to place tracking codes or tags and not again for any subsequent placement of tags or scripts.

Without Google Tag Manager, you’d have to edit your source code every single time you wanted to add a tag or script. This gets tedious, requires more resources, can get messy and opens your site up to critical errors.

You can combine all of your tags or scripts (for example, Facebook Ads, Google Ads, LinkedIn, CrazyEgg) into a single “manager” on your WordPress site so that you don’t have to keep bothering your developer or pasting random code snippets into your back-end.

Advertisement

Google Tag Manager will also give you an easy way to fire conversion tags, load Google Tag Manager on certain pages only, track link clicks, and more tracking features, all within the Google Tag Manager dashboard. We aren’t going to get into all the complexities of Google Tag Manager, some people have their entire role or business dedicated to implementing and fixing Google Tag Manager!

What are some examples of tags that I’d want to place into Google Tag Manager?

A few examples are listed above but many times the words “tags” or “scripts” are used interchangeably. In reality, you are placing a piece of code from a 3rd party platform that can help you with reporting, tracking or other insights.

For example, if you setup your Google Tag Manager account using our guide, you’d be able to place a Google Ads conversion tag on your thank you page in just a few clicks. This tag would then tell you right within the Google Ads interface if someone converted after seeing one of your ads.

Benefits Of Google Tag Manager On WordPress

#1: Less Developer Resources

If you don’t feel comfortable doing your own development, Google Tag Manager is perfect because you just need help getting the Google Tag Manager code placed initially then from there you should be able to place all other 3rd party tracking codes yourself!

We feel confident you can add Google Tag Manager to your WordPress website yourself using this guide and the plugin below even if you have little to no experience with WordPress websites.

Advertisement

#2: Lower Margin For Error

Inserting code snippets incorrectly yourself can seem straight forward but if you are just missing one character or place the code in the wrong spot, you could take your whole WordPress website down! Using Google Tag Manager creates a nice little sandbox using what’s called a “container”, and that keeps everything safe. It also ensures that most tracking codes are always place correctly in the section.

#3: Faster Site Speed

When all of your 3rd party scripts, whether they are one of the tracking codes mentioned above, part of a chat bot, or something else, if you consolidate all of them and place your Google Tag Manager container at the top of the section as instructed, this can make sure your site is loading.

The Easiest Way To Install Google Tag Manager On WordPress

The first thing you have to assess before installing Google Tag Manager is what are you going to do with your existing tags, especially Google Analytics…

The answer: consolidate! Generally speaking, nothing will happen if you don’t consolidate your Google Analytics or other tags into Google Tag Manager after installation but it makes for a messy setup and kind of defeats the purpose if you don’t consolidate after installing Google Tag Manager. After all, you want Google Tag Manager to be your one-stop-shop for all tags and scripts and if you have them inside and outside of the Google Tag Manager container then it may be tough to figure out later.

If you don’t have Google Analytics installed yet, or aren’t sure if you have any other tags, then you can continue with the guide with no worries! (You most likely don’t have any tags if you aren’t sure or just getting started with your WordPress website.)

Step 1: Add The Google Site Kit Plugin

You can certainly place the Google Tag Manager code manually or ask a developer to do so, but we’ve found the easiest way to install Google Tag Manager on your WordPress website is to download this free plugin from Google.

Advertisement

To install it, simply login to your WordPress website and navigate Plugins > Add New on the left hand side menu. Then search “Site Kit by Google”:

Once you click “Install Now”, then click “Activate”, which should be in the same spot as the “Install Now” after installing. Now you’re onto Step 2!

Step 2: Sign In & Sync Up The Google Site Kit Plugin

There is no true Tag Manager plugin, but this one-stop-shop plugin will have all the Google products and it makes it a lot easier than if they did a plugin for every product.

To proceed with the least amount of friction, you need to make sure to use the same Google account that you use for Google Tag Manager and Google Analytics (if you have an account setup already for your site):

Once you click “Sign in With Google”, make sure to check all of the boxes with permissions otherwise you may get a Site Kit install error:

Step 3: Complete Setup of Site Kit by Google Before Moving On To Add Google Tag Manager

As mentioned above, this is a one-stop-shop plugin for all of the Google products, so you’ll want to continue through the process of verifying ownership and even setting up a Google Console account.

But wait, what’s Google Console?

Google Analytics, Google Console, and Google Tag Manager are the holy trifecta of Google products to make sure you have all of the traffic and data that you need.

To put it simply, Google Analytics is primarily used to know where your users came from, what they viewed, etc. but Google Console can you give an extra edge on the SEO front by telling you what keyword they typed into Google.com in order to find your content! That’s powerful.

Advertisement

For those of you who are really advanced, you could also explore setting up Google Optimize as well, which helps setup easy split tests. For example, if you wanted to test two different versions of your homepage, you could setup a simple redirect test.

Step 4: Setup Google Tag Manager

Next up, you’ll actually create the Google Tag Manager account as the first part of the install process for Google Tag Manager for WordPress.

Simply navigate to the Google Site Kit Dashboard > Settings and go to “More Services” and there it is:

Follow the prompts to login again and create A Google Tag Manager account:

This is pretty straight forward but you’ll want to fill in your site title, URL and select web property here, as it’s a WordPress website and not any of these other platforms:

After you click “Create”, you’ll be greeted by Google Tag Manager code that it says you’ll need to place in order to install Google Tag Manager. But don’t panic! This was just to create the account, we can now go back to our WordPress website and finish things up without having to copy and place the Google Tag Manager code snippets.

Navigate back to your Google Site Kit Dashboard > Settings and click “Complete Tag Manager setup” on the right:

Then finally, click your account name that you created and your domain/container and you should be all set!

If successful, you should see this messaging at the top, congratulating you!

Advertisement

What’s The Difference Between Google Tag Manager Account vs. Container?

You’ve completed the install of Google Tag Manager for WordPress, but it’s important to know what to do next and how you can further your understanding of Google Tag Manager.

To answer the question, the way the hierarchy works for Google Tag Manager is that you can actually have multiple different containers under one account.

For most, you’ll just need the one container but if your website gets a bit more complex, or if you introduce subdomains, you may want to create a separate container inside the same Google Tag Manager account. For example, let’s say you own an event website as your main WordPress site, but you want to create a ticket portal where you use a 3rd party ticketing platform at tickets.yourevent.com. You may want to create two containers – one for the main even website, and one for the ticketing platform on your subdomain.

Should I Setup Google Analytics To My WordPress Website Now?

As mentioned at the beginning of the article, if you already had Google Analytics installed, then you’ll want to consolidate that tag into your Google Tag Manager container to keep things nice and tidy.

Simply create a tag within Google Tag Manager by clicking the “New Tag” button upon entering your container, click “Tag Configuration”, then select “Google Analytics GA4 Configuration” on the right side, and fill out the details in the tag out accordingly:

Then, enter your “Measurement ID” which can be found by following the instructions below, taken from the Google help docs:

  1. Sign in to your Google Analytics account.
  2. Click Admin.
  3. At the top of the Property column, select your property.
  4. In the Property column, click Data streams.
  5. Click the data stream for which you need the ID.
  6. In the Google tag section, click Configure tag settings.

Now select your tag to fire on every pageview and you are ready to publish changes to your WordPress website by clicking “Submit” within the Google Tag Manager interface and then “Publish”. It will ask you to name the “version” and it’s best not to keep it blank in case you ever need to reverse changes.

Google Tag Manager operates with a local version first until you publish changes. So that means you can make 100 changes and all have them reversable in your local version and then once you finalize your changes, you can publish them to the public.

Advertisement

Last step – don’t forget to remove your previous instance of the Google Analytics tag after you consolidate it into Google Tag Manager! This may cause you to duplicate your traffic!

How Do I Install Google Analytics After Install Google Tag Manager?

If you did not have Google Analytics installed yet before following this guide, you can get it installed in just a few clicks from the same page where we left off after successful install of Google Tag Manager.

There should be a green button that says “Setup Analytics” and then you can create that account:

Stephen Oduntan is the founder and CEO of SirsteveHQ, one of the fastest growing independent web hosts in Nigeria. Stephen has been working online since 2010 and has over a decade experience in Internet Entrepreneurship.

Continue Reading
Advertisement
Comments

Trending

Copyright © 2024 SirsteveHQ. All Rights Reserved.