Are you looking to install Google Tag Manager in WordPress?
If you want to integrate various analytics and marketing services on your WordPress site, then Google Tag Manager is a great tool you can use. It allows you to add and update various tracking codes on your website easily.
However, Google Tag Manager has a high learning curve. You’d have to spend some time learning how to use the tool. That said, we’ll also cover an easier alternative that makes it super simple to set up advanced tracking.
In this article, we’ll show you how to install Google Tag Manager in WordPress in the right way.
What Is Google Tag Manager?
Google Tag Manager is a free tag management tool by Google, which allows you to deploy and update different code snippets called ‘tags’ on your website.
With Google Tag Manager, you can easily add and manage all these codes from a single interface without having to edit your website’s code.
That said, there’s an easier alternative to using Google Tag Manager. Using MonsterInsights, you can set up advanced tracking and get features like eCommerce tracking, link and button click tracking, form conversions, and much more out of the box.
We’ll cover how to add Google Tag Manager in WordPress and show you how MonsterInsights automates tracking. You can click the links below to jump ahead to any section you’re interested in:
Watch our video tutorial on setting up Google Tag Manager, or read on below.
Set Up Google Tag Manager to WordPress
To add Google Tag Manager to WordPress, just follow these steps to get started.
Step 1: Create Your Google Tag Manager Account
First of all, you need to visit the Google Tag Manager website and then click the Sign-Up button.
Next, you need to sign in with your Google account. Once done, you can see the Google Tag Manager’s Create Account page. Click on the ‘Create Account’ button to get started.
On the next screen, you can add a new account. Enter your account name and choose a country in the Account Setup box. You can use your company name as your account name.
Next, you need to set up your container. A container is the collection of tags, triggers, and all configurations installed on a website.
You can enter your website name as your container name. Choose ‘Web’ under the Where to use container option, and then click on the Create button.
Now you’ll need to accept the Google Tag Manager Terms of Service Agreement to proceed. Check the box next to ‘I accept the Data Processing Terms as required by GDPR.’ at the bottom, and then click the ‘Yes’ button on the top right corner.
If you want to learn more about GDPR, go through our guide on GDPR and Google Analytics.
Upon accepting the terms of service, you’ll see a new popup window appear on the screen with code snippets to install Google Tag Manager on your website.
There’re two code snippets to be added to the header (inside <head > tag) and in the <body > section on your website.
Step 2: Adding Google Tag Manager Code to WordPress
Login to your WordPress dashboard and then install Insert Header and Footers plugin. Upon activation, go to Settings » Insert Headers and Footers page.
Now you can see two boxes for adding header and footer code. Go back to your Google Tag Manager account and copy the code in the first box. Paste the code into the ‘Scripts in Header’ box.
Similarly, copy the other code from your Tag Manager account and insert that into the ‘Scripts in Footer’ box. The section will print scripts before the closing </body> tag.
While it’s not right after the opening body tag (as Google suggests), as long as the snippet is enclosed within the <body>…</body> tag, it will be fine.
After that, don’t forget to save your changes.
That’s it! You’ve successfully installed Google Tag Manager on your WordPress site. Now you can use your Google Tag Manager dashboard to install any tracking code to your WordPress website.
Step 3: Add and Publish Tags in Your Tag Manager
Once you’ve installed Google Tag Manager on your website, you’re ready to add code snippets (tags) provided by different tracking tools on your site.
Click on the ‘New Tag’ icon, and follow the steps to create your first tag.
For example, you can check out our full guide on installing Google Analytics in WordPress with Google Tag Manager.
You can now add different tags in your Google Tag Manager container by following the same process and integrating your WordPress site with various marketing and tracking tools.
Set Up Advanced Tracking Using MonsterInsights
MonsterInsights is the best alternative to using Google Tag Manager. It’s easier to use, and you don’t have to spend several hours learning how to use Google Tag Manager.
Plus, there’s no need to go through the lengthy process of setting up individual tags on your WordPress website. Not only that, but using MonsterInsights removes any risk of making a mistake and messing up tracking.
MonsterInsights provides advanced features out of the box. It also allows you to set up Google Analytics to a WordPress site without editing code.
So what makes MonsterInsights a better alternative to Tag Manager? Let’s look at some of the reasons why you should be using MonsterInsights instead.
1. Track Link and Button Clicks Out of The Box
Google Analytics doesn’t track link clicks or button clicks by default. You would have to manually set up tracking for each link and button using Google Tag Manager or adding a piece code to your website.
But with MonsterInsights, you can track link clicks out of the box. There’s no need to set up additional tracking or editing code. Here are some of the things you can track:
- Set up affiliate link tracking to grow your revenue
- See which outbound links get the most clicks
- Find out whether people click on a mailto or telephone link
- Track file downloads on your website
- Add call-to-action (CTA) button tracking to boost conversions
- See which products people buy a lot by tracking add-to-cart buttons
2. Setup Form Conversion Tracking
Now, if you have multiple forms on your website, like a contact us form or an order form, you’d want to see how they’re performing.
Usually, you would have to create tags to each form using Google Tag Manager so that Google Analytics can track their performance.
But MonsterInsights make this process super simple. All you have to do is install its Form addon, and the plugin will automatically track all types of WordPress.
And the best part is that you can view their performance inside the WordPress dashboard. Just go to the Forms report and find out the number of impressions, conversions, and conversion rates of all your forms.
You can also identify the source of your form conversions and see which channels help capture the most leads.
3. Track eCommerce Performace in Just a Few Clicks
Another advantage of using MonsterInsights is that you can enable Enhanced Ecommerce in just a few clicks and find out how your online store is performing.
Using the eCommerce addon, it’s very easy to track revenue, conversion rate, popular products, conversion sources, and much more in Google Analytics.
It also helps in understanding the behavior of your customers. You can see which pages they visit, which products they add to the cart and remove from the cart, and how much time they spend before completing a transaction.
4. Enable Scroll Tracking without Coding
MonsterInsights also helps you track the scroll depth of your website. Scroll tracking shows how far people scroll your webpage.
It’s an extremely useful metric to track if you want to boost conversions. For example, you can find out the average scroll depth of your site and place call-to-action (CTA) in the right place to get more clicks and sales.
You can check out our detailed comparison of MonsterInsights vs. Google Tag Manager for more details.
And that’s it!
We hope this article helped you to learn how to install Google Tag Manager in WordPress in the right way. You may also want to see our guide on how to configure your WordPress website with Google Search Console.