How to Set Up Google Tag Manager in WordPress (Easy Way)

How to Set Up Google Tag Manager in WordPress (Easy Way)

Are you looking for a way to use Google Tag Manager on your WordPress website?

Google Tag Manager is a great tool to track your digital marketing efforts. And by combining it with Google Analytics, you can easily see how people interact with your site.

In this article, we’ll show you how to set up Google Tag Manager in WordPress.

What is Google Tag Manager?

Google Tag Manager (GTM) is a free tool that lets you track conversions, web traffic, clicks, and gather information to see how your marketing activities are performing.

ExactMetrics is the best WordPress Analytics plugin. Get it for free!

And how does it do that?

It uses tags that collect data about how people use your website. Tags are tracking codes that you place on your website. One of the benefits of using tags is that you can set up tracking on your WordPress site without having to edit code.

With Google Tag Manager, you can easily manage all your tags in one place. And it works smoothly with analytical tools like Google Analytics and DoubleClick.

But is using Google Tag Manager worth it?

Should You Use Google Tag Manager for WordPress?

Google Tag Manager is a powerful tool to use but is it useful on your WordPress website? Since there are so many WordPress plugins out there that can do that job for you, using GTM may not be necessary.

Why do we say that?

Well, for starters, Google Tag Manager is prone to many errors if the tracking code isn’t set up correctly. Then there’s a high learning curve to using the tool. It’s not as straight forward and any mistake in any step will result in inaccurate tracking.

So, an easier way of setting up advanced tracking in WordPress is through plugins like ExactMetrics.

It’s the best premium WordPress Analytics plugin that automatically tracks things like file downloads, affiliate link clicks, outbound link clicks, mailto links, telephone numbers, and more in Google Analytics.

You don’t have to worry about additional configuration steps or mess with coding to set up tracking when you have ExactMetrics installed on your site.

With that, are you ready to learn how to install Google Tag Manager on WordPress?

How to Add Google Tag Manager to WordPress

Just follow these steps and you’ll be able to set up GTM in no time.

Step 1 – Sign Up for a Google Tag Manager Account

The first thing you’ll need to do is sign up for a Google Tag Manager account by clicking on Start for free.

signup for google tag manager wordpress

A new tab will open where you’ll have to create a new account. Enter an account name and select a country. You can also check the option if you want to share your data anonymously to Google.

Next, scroll down and enter a container name. A container can be your website, mobile app, or a server where you’ll add your tags.

Since we’re setting up Google Tag Manager for WordPress, select Web as the option, and click Create.

You’ll then have to agree to Google Tag Manager terms of service agreement. Simply check the box for I also accept the Data Processing Terms as required by GDPR and click Yes on the top right corner.

Step 2 – Add Tag Manager Code to WordPress Header

Once you agree to the terms of service, Google Tag Manager will give you 2 tracking codes that you’ll have to insert in your WordPress website.

If you don’t know how to edit code, then it’s better to use a WordPress plugin. To enter GTM codes, you can use Insert Headers and Footers plugin. It’s free to use and all you have to do is paste the code and it will automatically insert it on your WordPress site.

Go to your WordPress dashboard and then click on Plugins » Add New. Now search Insert Header and Footer in the search bar and click Install Now. Next, activate the plugin.

Then go to Settings and click on Insert Headers and Footers. Now copy the Google Tag Manager code in the previous step and paste it here.

Paste the code for <head> under Scripts in Header and code for <body> under Scripts in Body.

Click Save once you’re done.

And now you’re ready to use Google Tag Manager on your website.

Step 3 – Create a New Tag for Your Website

You can create tags for your website and start tracking different user interactions. For this tutorial, let’s see how you can add Google Analytics using Tag Manager.

To create your first GTM tag, go to your workplace and then click on Add a new tag under Overview.

Next, give a name to your tag and then click on the Tag Configuration.

Then select the analytical tool you want to connect Google Tag Manager with. In this case, select Google Analytics.

Next, select Page View as an option under Track Type and choose New Variable under Google Analytics Settings.

Now enter your Google Analytics tracking ID. You can find that under the Admin setting in your Analytics account (Admin » Tracking Info » Tracking Code).

Simply paste your tracking ID and click Save.

Now, you’ll have to create a Trigger for your tag. To do that, click on Triggering.

On the next screen, select All Pages.

Once that’s done, click Save at the top right corner.

Your tag for Google Analytics is now ready and you can then Preview and Submit it.

And that’s it!

You can now use Google Tag Manager to track different things on your WordPress website. But if you’re looking for an easier way of setting up advanced tracking, then give ExactMetrics a try.

We hope that you liked our article on how to set up Google Tag Manager in WordPress. You can also go through our post on how to track link clicks on your website with Google Analytics.

Don’t forget to follow us on Twitter and Facebook to get to know the latest tutorials on Analytics.


Want to Try ExactMetrics for Free?

Enter the URL of Your WordPress website to install ExactMetrics Lite.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.