Google Tag Manager for WordPress – A Beginner’s Guide

WordPress can easily be integrated with Google Analytics 4, which lets you see how visitors interact with your site. But there are other tools that can help you improve your site’s performance. One example is Google Tag Manager, which lets you add tags to your site without writing any code.

Install Google Tag Manager.

  1. Visit https://tagmanager.google.com/ > Click Accounts > Create Account.
  2. Name your account. Think of this from a high level, give a name like your business name.
  3. Next, it’s time to name your container. Your container is usually used for one website so it’s good to give this a name that relates to your website(s) that you are installing GTM on.
    1. Select the type of content: Web, AMPAndroid, or iOS. If setting up a mobile container, select whether you’re using the Firebase SDK or one of the legacy SDKs.
  4. Click Create
  5. Be sure to agree to the Terms of Service.

Add it to your site.

Once your account and container are created Tag Manager will present you with 2 javascript snippets. Don’t worry if you accidentally closed this. You can always find these snippets in the Admin area of your container.

Copy your Head snippet.

Now here’s the tricky part ideally, you only want to add this snippet once so your GTM container will be on your entire site. Each WordPress site will have a different way of adding this script to your site. While you may have access to your headers.php and footers.php files this can create issues unles you know exactly what you are doing. A more reliable way is to use a plugin that gives you access to the head and body.

When adding the head code get it as high in the head code as possible. This let’s Tag Manager be the first to interact with the page and run its tags.

Copy your Body (noscript) snippet.

Place the Body code snippet immediately after the <body> tag in your HTML output. Again our goal is to get it as high in the code as possible.

You did it!

Create your tags.

If you want to add a new tag, simply click “Create a new tag.” This will open up a slide window where you can name the tag and choose what type of data you would like to collect. Select your trigger and Save.

This video helps explain creating tags in more detail.

You’re WordPress site is ready!

If you’re new to GTM, you might not realize how much power it has. In fact, there are so many options available that it can be overwhelming at first. Fortunately, Phantm Marketing has experts to help you get more out of your Google Tag Manager Account. Contact us today!

Some More Cool Projects

Omi

Digital Audit, Market Research, User Experience

Marie

Research, Print Design, Content Creation, Website Design

Download your GTM Recipe

Just fill out the form so we can send you your GTM recipe. 

"*" indicates required fields

Name*
Would you like to talk with us about migrating to GA4?*