Google Tag Manager is one of the most important tools in a marketer’s toolset – and often one of the most overlooked.
One of the best things about Google Tag Manager is that even though it does come with quite the learning curve, it is accessible for most non-technical marketers out there. In other words, even if you’re not code-savvy or are even uncomfortable around code, you can use most of its features – with a little light-reading, that is.
In this post, we’ll teach you how to install Google Tag Manager on your WordPress or Shopify website, in just under 10 minutes.
Let’s get to it.
How to Install Google Tag Manager
Create Your Account & Container
To use Google Tag Manager you’ll need to create an account, and a container.
Each business should create an account and a different container for each domain that belongs to that business.
We’ll dive deeper into what accounts and containers are in our next post.
To do so, head on over to https://tagmanager.google.com and click on the blue “start for free” button, on the top-right corner.
The on-screen instructions should be easy to follow, and shouldn’t take more than a minute to fill in.
- Add a name to the account.
- Choose your country from the drop-down menu.
- Add a name to the container you’re about to create.
- Select a target platform. Most likely, that will be Web.
- Click on “Create”.
We recommend that you name your account after your business, and the container after the domain URL, as in the image above.
Find Your Container Code
Once you’ve created your account and container, you will now need to find and access the container code.
Don’t worry if this sounds a little too technical – it’s a lot simpler than it looks.
To access the container code, click on the “GTM-XXXXX” button as in the image below. You can also access the code in the admin section, under “Install Google Tag Manager”.
You can now access two different sections of code that need to be added to your website, before you can start using Google Tag Manager.
In this post, we’ll detail a few different methods on how to add this code to your website on WordpPress, and Shopify.
Even you’re not a developer, if you follow these steps, you’ll be able to add the code in under 10 minutes.
Install Google Tag Manager on WordPress
There are two different methods to install Google Tag Manager on your WordPress website.
The first (and recommended) method is to add the container code directly into the theme editor. To do so, head over to the “Appearance” menu, and then click on “Editor”.
Proceed with caution: make sure to back-up your website, and make changes only to the child-theme.
Once you’ve accessed the theme’s editor, click on the “Theme Header” section in the menu to the right.
Paste the first section of the code immediately under the <head> tag, as demonstrated in the image below.
Once that’s done, scroll down until the closing </head> tag and, right under the opening <body> tag, paste the second section of code, and hit the “Update File” button.
You’re all set!
The alternative method of installation is to use a WordPress plugin.
This is a much faster alternative than the former but comes with a few downsides – which is why we recommend the former alternative.
To name a few
- Additional add-ons can result in lower website speeds.
- Less control on the code placed on your website.
There are a lot of alternatives as to which plugin you can use, but we can recommend Google Tag Manager for WordPress by Thomas Geiger.
To install the plugin, you just need to access the plugin’s settings, and paste the container ID into the correct field.
Click on “Save Changes”, and voila!
Installing on Shopify
To install Google Tag Manager on Shopify, we’ll need to edit the theme’s code so we can add the cotnainer’s code.
You can do so easily by following the instructions below.
Under the “Online Store” menu, click on “Themes” and then on the “Edit Code” button, under the “Actions” tab.
Once in the editor panel, find the theme.liquid file from the left sidebar.
Take the second section of the container code from Google Tag Manager, and paste it right under the <body> tag, as in the image below. Click on “Save”.
Once you’ve completed the steps, head over to the “Preferences” menu, under “Online Store”, in the left sidebar menu.
Paste the first section of the container code in the Google Analytics section.
You’re all set!
If you’re using Google Analytics, we recommend you add the code in this section too – and not on Google Tag Manager.
Publishing Your Container
Once you’ve completed the steps above, and before you can validate if your installation was successful, you’ll need to publish the container.
To do so, access your Google Tag Manager dashboard and, in the top-right corner, click on the “Submit” button.
Validate Your Installation
Now once all that’s out of the way, how can you make sure the installation was successful?
There are two alternatives to do this.
The Preview Mode
The preview mode is one of Google Tag Manager’s most resourceful features.
Once you’re in Google Tag Manager’s dashboard, to the left of the “Submit” button, there’s an additional “Preview” button.
If you click this button, you’ll access Google Tag Manager’s Preview Mode.
Once you’ve refreshed your website, a panel will appear on the lower part of your screen – which means you have successfully installed Google Tag Manager.
Google Tag Assistant
Google Tag Assistant is a browser extension and it’s very simple to use.
You just need to install the extension and, once it’s activated, click on the icon and hit the enable button below – that gets the Tag Assistant running.
Refresh the page, click on the Tag Assistant’s icon again, and you will see Google Tag Manager appear on the dashboard, next to an icon of a tag.
If the icon next to the tag is green, you’ve successfully installed GTM on your website.
If it’s red, well… you get it.
Now that you’ve installed Google Tag Manager, it’s time to start reaping the full benefits of this incredible tool.
To do that, you’ll need to understand the basics of Google Tag Manager. For that reason, we’ve written a few posts on the topic.
If you’re interested in learning more, we recommend you read our Google Tag Manager Tutorial.
As you get more advanced, you’ll start digging into variables and the data layer, and that’s where you can unlock some of the amazing features this tool provides.
Did you have any trouble with the installation process?
Let us know in the comments below, or feel free to reach out to us on our contact page – we’re glad to help out.
Make sure you subscribe to our newsletter to receive more content similar to this post on your email. We would be thrilled to keep in touch!