Manage all your codes in one place!

With Google Tag Manager, you can house all tags (whether it’s Google Analytics code, Facebook Pixel code or any other custom HTML code) in a universal container.

You will never need to waste hours and manpower inserting a code or changing an existing code manually on every page of your site.

With just a few clicks, you can do this all in a few minutes on one platform.

Most importantly, you simply have to add one code, the Google Tag Manager code, on all pages of your website.

Today, I’ll show you the steps you need to do to set up Google Tag Manager (one of the best and FREE tag management tools).

[Entrepreneurship Tips] [13-Step Guide] How To Set Up Google Tag Manager On Your WordPress Website

Disclosure: Some of the links below are affiliate links. I will earn a small commission, at no extra cost to you, if you purchase through these links. Your support encourages me to continue blogging and help with the costs of hosting this site. Thank you!

1. Sign Up For A Google Account

To start using Google Tag Manager, you’ll need to have a Google account. And I assume you have one already since you need it to implement Google Analytics on your website.

But if you haven’t sign up, do consider getting a Google Workspace (formerly G Suite) account instead. On top of the free Google Tag Manager, you also get your own domain email and 30GB cloud storage at only $6/month.

Google Tag Manager is useful when running an online business. But I encourage you to attend online business classes and marketing and sales classes for more business growth tips. Or watch streaming broadcasts of free online classes at CreativeLive! You can also join online courses at Fiverr Learn~

2. Sign In To Google Tag Manager & Create New Account

When you sign in to Google Tag Manager, you’ll either be greeted with the create new account (if it’s your first time signing in) or a list of Google Tag Manager accounts (if you’ve created a Google Tag Manager account before). For the latter, click on Create Account above the list of accounts.

Google Tag Manager - Create New Account

Now, fill up your

  • Account Name
  • Container Name: I usually just use the domain URL
  • Type of Container: In this case, we’ll choose web

Then, click on the Create button.

You’ll have to accept the Terms of Service Agreement and you’ll be given the Google Tag Manager code snippet.

3. Configure Built-In Variables

Under the Workspace tab, click on Variables on the left menu.

Click on the Configure button under the Built-In Variables.

Google Tag Manager - Variables

Now, enable those you need. Google provides a technical explanation of the different variables.

For example, if you intend to track clicks on buttons or links, ensure that you enable all variables under Clicks.

You can always return here and enable or disable the variables at any time you want.

Google Tag Manager - Configure Built-In Variables

4. Add Google Analytics Code

Next, click on Tags on the left menu and click the New button.

Google Tag Manager - Create New Tag

You can name this simply as Google Analytics.

Ensure that you have the following settings when configuring the tag

  • Tag Type: Universal Analytics
  • Track Type: Page View
  • Check the checkbox beside Enable overriding settings in this tag
  • Tracking ID: Log into Google Analytics, click on Tracking Info under the Property Column then click on Tracking Code. Now, copy and paste the Tracking ID here.
  • More Settings > Advertising: Choose True to Enable Display Advertising Features

Then select to trigger on All Pages.

Google Tag Manager - Google Analytics Tag

5. Add AdWords Remarketing Code

Again, click on the New button under Tags and name this as AdWords Remarketing.

Ensure that you have the following settings when configuring the tag

  • Tag Type: AdWords Remarketing
  • Conversion ID
    • Old Interface: Click on Audiences under Shared Library then click on Remarketing Tag Details. Select Setup and View AdWords remarketing tag and instructions. Now, search for the Conversion ID in the code snippet then copy and paste it here.
    • New Interface: Click on the gear icon at the top-right corner, click Audience manager under Shared Library and click on Audience sources on the left menu. Choose AdWords tag, expand the Setup instructions and tag code then click on Use Google Tag Manager. Copy and paste the Conversion ID here.

Choose to trigger on All Pages.

Google Tag Manager - AdWords Remarketing Tag

6. Add Facebook Pixel Code

Log into Facebook Ads Manager. Click on Pixels under the Measure & Report column then click on Create a Pixel button. Facebook will name the pixel after your account name by default.

To install Facebook Pixel code, you can

  1. Use an Integration or Tag Manager
  2. Manually Install the Code Yourself
  3. Email Instructions to a Developer

I usually choose the manual installation. Scroll down and copy the Facebook Pixel code.

Now, return to your Google Tag Manager and create a new tag.

Name it as it is, Facebook Pixel.

When configuring the tag, choose Custom HTML and paste the code you just copied.

Again, choose to trigger on All Pages.

Google Tag Manager - Facebook Pixel Tag

7. Add Triggers

Next, click on Triggers on the left menu.

This is where you create triggers. You can specify conditions where you want the tags or codes to fire.

As a guideline, I name my triggers so that they’re easy to understand at one glance. For example, I might name them as

  • blog.nicolecw.com
  • Phone Number on Contact Page

You can edit accordingly like Phone Number Button Click on Contact Page.

7a. Create Subdomain Triggers

Google Tag Manager - Subdomain Trigger

If you have subdomains, you can create triggers to only fire tags on certain subdomains like blog.nicolecw.com. This way, the tag doesn’t fire on all pages.

You can also adjust the following to a more specific page like Page URL contains blog.nicolecw.com/example-post.

  • Trigger Type: Page View
  • Select Some Page Views
  • Page URL contains blog.nicolecw.com

7b. Create Click Triggers

Another example would be tracking clicks on buttons or links.

Google Tag Manager - Click Trigger Type

  • Trigger Type: Click > All Elements (for all types of clicks) or Just Links (for link clicks only)
  • For Just Links, you can choose to Wait for Tags and Check Validation. I usually enable both.
  • Select Some (Link) Clicks: If you choose this option, you can specify conditions such as firing this trigger when Click URL, Click Class, Click Element contains/starts with/matches RegEx etc.

Then, you define the conditions. You can use the click variables or the page variables.

Google Tag Manager - Link Click Trigger

8. Add Event Tracking

After creating the triggers for button clicks and link clicks, you can set up event tags in Google Tag Manager.

Head over to Tags and create a new Event Tag

  • Tag Type: Universal Analytics
  • Track Type: Event
  • Fill up the Event Category, Action, Label and Value (optional, you can leave this blank)
  • Check the checkbox beside Enable overriding settings in this tag
  • Insert your Tracking ID

Then choose the button click trigger or link click trigger so the event tag only fires when this condition is met.

Google Tag Manager - Google Analytics Event Tag

Again, name them in a way you understand.

  • GA Event – Phone Number on Contact Page
  • Category: Phone Number
  • Action: Contact Page Button Click

Another tip: You don’t have to give fixed names to the Event Category, Action, Label.

Click on that plus block icon on the right and choose a variable.

For instance, if I name my Event Action as From {{Page URL}}, it’ll display as From /contact/ or From /about/ in the Event Action in Google Analytics. And I can clearly see which page of my website did this event occur.

This way, there’s a fixed portion (From) and a customized portion (Page URL) in the name.

9. Add Other Codes

When you create a Tag, there is a list of the various tag types that Google Tag Manager support. Like LinkedIn Insight and Twitter Universal Website Tag.

All you have to do is insert the unique ID.

If you have other codes you want to add to your website that are not listed, simply choose the Custom HTML and manually insert the code.

Google Tag Manager - Tag Type

10. Install Google Tag Manager Code On Your WordPress Website

Click the Admin tab then click on Install Google Tag Manager under the Container column.

Google Tag Manager - Install Google Tag Manager

Here are the codes that you need to insert into your website.

Google Tag Manager - Install Code

10a. Use Insert Headers and Footers Plugin

Install the Insert Headers and Footers plugin for your WordPress website.

Copy and paste the <head> code into Scripts in Header of the plugin.

WordPress Plugin - Insert Headers and Footers

10b. Use Elegant Themes Divi

If you’re using Elegant Themes Divi as your WordPress theme, you won’t need to download the above plugin. You can simply insert the code in the Divi Theme Options.

Under the Integration tab,

  • Copy and paste the <head> code into Add code to the < head > of your blog
  • Copy and paste the <body> code into Add code to the < body >

Elegant Themes Divi - Theme Options Integration

11. Switch To Preview Mode

Return to Google Tag Manager and click on the Preview button at the top-right corner.

Google Tag Manager - Preview

Now, type the URL of the page that you have Google Tag Manager installed into the address bar. You can simply go to your homepage. Remember, use the tab or window that you have enabled preview mode (not a new browser!).

You will see a window at the bottom of the page that contains detailed information about tags fired on this page and tags not fired on this page.

Browse through your website and check whether the correct tags are firing on the correct pages or clicks.

12. Publish Google Tag Manager

When you’re done checking the tags, go back to Google Tag Manager and click on Leave Preview Mode.

Google Tag Manager - Submit

Then, click the Submit button. You can choose to give your version a descriptive name and list down the changes. Or you can leave it blank and proceed to click on the Publish button.

Google Tag Manager - Publish Google Tag Manager

And you’re done! It’s as simple as that.

Just install one code on your site and numerous tags will fire according to the conditions you’ve set.

13. Check If Code Is Implemented Correctly

To check whether Google Tag Manager is implemented correctly on your site, install Tag Assistant and Facebook Pixel Helper on your Chrome browser.

They should then appear in the extensions bar. You can adjust the bar so it shows all the extensions you’ve installed.

Now, go to your website.

13a. Use Tag Assistant To Check Google Tags

Click on the Tag Assistant icon then click on Enable. After refreshing the page, you should be able to see the various tags installed on the site when you click on the Tag Assistant icon again.

Chrome Extension - Tag Assistant

Ensure that the icon is not gray (no code was found) or red (critical implementation issues). You can click on them for detailed explanations of how to resolve the issues.

Also, if you have some AdBlock extension, make sure that it’s disabled on your website. This is one reason why you have a red upset icon when you click on the Tag Assistant extension.

13b. Use Facebook Pixel Helper To Check Facebook Pixels

Next, click on the Facebook Pixel Helper icon and you’ll see the various Facebook Pixels installed on the page. Just double-check that the Pixel ID is correct.

Chrome Extension - Facebook Pixel Helper

If you don’t see any Facebook Pixel, it might be due to the fact that you haven’t publish Google Tag Manager.

Now It’s Your Turn

I didn’t go into detail explaining tags and triggers or thoroughly demonstrate setting up event tracking because they’re more advanced.

This guide is written for beginners who want to set up Google Tag Manager correctly on their WordPress website.

Leave a quick comment below if there’s anything unclear. Or if you have trouble setting up certain tags or triggers.

Though I’m not an expert (I only know how to set up basic tags and event tracking like button and link clicks), I’ll see if I can help~!

If you have difficulties setting up Google Tag Manager or prefer spending time on more important business matters, you can consider hiring a web analytics expert from Fiverr instead. There are also top-rated professionals from Fiverr Pro who are hand-vetted for stellar quality and service.

 

Copyright © 2017-2023
Nicole C. W. All Rights Reserved.

Want to receive updates?

Join My Newsletter Now

 

Be the first to know about hot new releases, tips from my blog and more.

Pin It on Pinterest

Share This