skip to Main Content

How to set up Google Tag Manager in WordPress

Google Tag Manager (GTM) is an awesome tool that lets you to easily add tags to your website. With Tag Manager, you can deploy Google Analytics, add pixels, track events, and more. We’ll show you why you should use Tag Manager and how to set it up on a WordPress website.

Why you should use Google Tag Manager

If you’re using WordPress to power your website, Google Tag Manager can help you in a variety of ways. We think it’s a time-saving tool that lets us do a better job of managing digital marketing tasks. GTM can help you reduce the number of plugins you’re using, minimize code changes, and help you scale up digital marketing activities. We use it for many different tasks, including verifying Google Search Console, tracking link clicks, tracking paid campaign conversions, and event tracking. We could list others, but you get the gist.

How to set up Google Tag Manager on a WordPress website

There are a number of components that come together to make Google Tag Manager work. We’ll walk you through creating a Google Tag Manager account, installing GTM on your WordPress website, creating a tag, and publishing the container. You’ll want to make sure you have Google’s Tag Assistant extension, too. Let’s get started.

Create your Google Tag Manager account

  1. Open a new browser tab and go to
  2. Log in using your Gmail address. You’ll want to make sure you’re using the same Gmail address used to set up Google Analytics and Google Search Console.
  3. Fill out the Account Name. We recommend using the business name.
    1 - Add Account
  4. Select your country of origin.
  5. Fill in the Container name. This is your domain name.
  6. Select Web.
  7. Select Create.

Install Google Tag Manager in WordPress

Once you create a Google Tag Manager account, you’ll be prompted to Install Google Tag Manager:

3. Install Tag Manager

There are multiple approaches to getting the snippets on your WordPress website.

You could:

  • Use your WordPress theme’s settings to add the code snippets to the <head> and <body> of your website, or
  • Implement snippets using the popular and respected Insert Headers and Footers plugin, or
  • Edit header.php directly to add the code snippets.

We’ll show how to add the Google Tag Manager code snippets to header.php:

  1. Log in to WordPress.
  2. In your theme files, access header.php.
  3. Add the code snippets to the <head> and <body> sections, respectively.
  4. Update the file.
  5. Go to your website URL.
  6. Enable Tag Assistant.
  7. Refresh your browser window and confirm Tag Manager has been installed on your website.

At this point, you’re all set. Google Tag Manager is on WordPress and you can start adding, testing, and deploying tags. If you’re looking to add Google Analytics to your website using the help of Google Tag Manager, check out How to add Google Analytics to your WordPress website.


Google Tag Manager can save you time, money, and can help you be more efficient with your digital marketing efforts. Setting up this tool on your WordPress site takes some work, but it also comes with a huge payoff. As you expand your digital marketing activities, think about how Google Tag Manager can help you measure your efforts. If you liked this post, check our blog for more tips. Happy tagging!

Josh Gellock

Josh is the principal SEO consultant at Expander Digital, an SEO studio he founded in 2014. He's been in the SEO space since 2011 and helps businesses manage their SEO through projects, consultations, and campaigns. When he’s not meeting with clients, you can find Josh spending time with his children or on a bike.

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *