MENUMENU
  • Services
    • Services
      • Search Engine Optimization
      • Local SEO
      • Generative Engine Optimization
      • Digital PR
      • Content Marketing
      • Email Marketing Services
      • Lifecycle Marketing
      • Paid Media Advertising
      • Social Media Marketing
      • Creative Design Services
      • Conversion Rate Optimization
      • Website Design & Development
      • Amazon Marketing Services
      • Franchise Marketing
      • Franchise Development
      • National to Local Marketing
      • Reporting and Data Analytics
      • Digital Marketing Strategy
  • Who We Serve
    • Who We Serve
      • Franchise Marketing
      • B2B Marketing
      • Lead Generation
      • Ecommerce
      • We Build Custom Strategies
      • View Sample Industries
  • About Us
    • About Ignite Visibility
      • Our Story
      • Our Values
      • Our Team
      • Clients
      • Diversity & Inclusion
      • Our Blog
      • Marketing Resources
      • Franchise Marketing Resources
      • Careers
      • Hiring Notice
  • Case Studies
  • Awards
  • Contact
  • 619.752.1955
Home / Blog / Google Tag Manager & SEO: Everything You Need to Know

Google Tag Manager & SEO: Everything You Need to Know

October 1, 2019 By John Lincoln

Want a better way to keep track of and hit your SEO goals?

In this post, I’ll teach you how to track your SEO goals with Google Tag Manager.

Google Tag Manager

What We’ll Cover:

  • Introduction to Google Tag Manager
  • How It Works
  • Setting up Google Analytics with user-defined variables
  • SEO goals and built-in variables
  • Tracking form submits with GTM codes
  • Tracking custom Google Analytics Events
  • FAQ

One of the best tools in the arsenal of a digital marketer is a tag. That’s a custom snippet of code, running on a website or app, that sends information to a third party system.

That third party system can aggregate the information it receives to provide analytics. Those analytics can be invaluable in determining marketing strategies going forward.

The problem with tags is that there are a lot of them. If you want your website to send different types of data to various third-party systems, you’ll need to deploy separate tags to specific pages on your website.

That gets pretty ugly.

Enter Google Tag Manager (GTM), your one-stop-shop for managing all your tags without the aid of a developer.

Introduction to Google Tag Manager

How Google Tag Manager Works For Reach SEO Goals

Google Tag Manager goal tracking offers you a container tag that you place on all your website pages. If you want to use it in a mobile app, you’ll deploy it with Firebase SDK.

The container tag replaces all the other tags on your site, including tags from Google such as Google Ads and Google Analytics.

GTM SEO doesn’t just support Google tags, though. It also supports several other third-party tags.

A Few of the many tags supported by google task manager
Few of the many tags supported by google task manager.

Once you’ve added the Google Tag Manager code to your site, you can add, update, and administer tags on your site from a user-friendly Google console. It will serve as your SEO tag manager. No developers are needed.

Tags “fire” at your discretion. For example, you can set up tags to fire whenever any page on a website is visited by someone. Alternatively, you can also set up tags in response to events, such as when a customer removes an item from a shopping cart.

You can also use variables (some custom and some pre-defined) to help define triggers and the data that they send. For example, you might set up variables for cookie values or page URLs.

For advanced GTM SEO users, there’s the so-called “data layer.”

That’s a piece of JavaScript object code that’s used to manage the information collected by GTM goal tracking.

If you want to play with the data layer to reach your SEO goals, you’ll either need to enlist the aid of a developer or get your hands on a good plugin that works with your content management system (CMS).

Although you can set up several GTM accounts, you’ll typically only need one account for all of your websites. You can, however, set up multiple containers with just one account.

Once you’ve set up your account, here are some tips for getting the most out of Google Tag Manager for SEO.

Setting up Analytics With User-Defined Variables For SEO Goals

Before you get too deep in the weeds with GTM, Google recommends that you set up a few user-defined variables that will save you time later on.

What’s the point of variables? They simplify your life so you don’t have to enter difficult-to-remember and/or lengthy values over and over again.

User Defined Variable

For example, do you know your GA tracking ID off the top of your head? Probably not. With Google Tag Manager variables, you can associate your tracking ID with an easy-to-remember variable name and simply reference that variable name when using GTM.

Here are some variables you should set up:

  • gaProperty – Your Google Analytics (GA) Tracking ID. Set this variable to the value of your Tracking ID just once, and you never have to remember it again.
  • gaDomain – Used to establish Automatic Cookie Configuration for a particular domain. It’s considered a best practice for GA. Set this variable to “auto.”
  • gaCrossDomains – Used to set up cross-domain tracking if you have traffic moving between multiple domains. Set this variable to a comma-separated list of all your domains once and you won’t have to update all your GA tags.

SEO Goals and Built-In Variables

Good news: you don’t have to define all your own variables in GTM for SEO. Google has already defined many widely used variables for you.

The pre-defined variables for SEO goals fall into several categories: page variables, utility variables, error variables, click variables, form variables, and history variables.

built in variables

Here are the pre-defined page variables:

  • Page URL – The full URL of the current page.
  • Page Hostname – The domain name of the current page.
  • Page Path – The relative path of the current page (for example, “/myArticle”).
  • Referrer – The full URL of the page which brought the visitor to the current page.

Here are the pre-defined utility variables:

  • Event – The value stored in the “event” data layer key.
  • Environment Name – The name of the environment being previewed. An environment can be a testing or staging environment that QA people use before sending a website into production.
  • Container ID – The ID of the Google Tag Manager container for SEO goals
  • Container Version – The version of the GTM container.
  • Random Number – A random number between 0 and 2,147,483,647.
  • HTML ID – The ID of the custom HTML tag (use with Tag Sequencing).

Here are the pre-defined click variables:

  • Click Element – The HTML element that was the target of an auto-event. An auto-event is an action on a tag that causes the SEO tag manager to collect and identify what just happened. Clicks and form-submissions are examples of an auto-event.
  • Click Classes – The value contained in the class attribute of the auto-event element.
  • Click ID – The value of the id attribute in the auto-event element.
  • Click Target – The value of the target attribute in the auto-event element.
  • Click URL – The value of the href or action value of the auto-event element.
  • Click Text – The value of the textContent or innerText attribute in the auto-event element.

Here are the pre-defined form variables:

  • Form Element – The HTML element that was the submitted form.
  • Form Classes – The value contained in the class attribute of the form element.
  • Form ID – The value of the id attribute in the form element.
  • Form Target – The value of the target attribute in the form element.
  • Form URL – The value of the action value of the form element.
  • Form Text – The value of the text in the form element.

Here are the pre-defined history variables:

  • New History Fragment – The new URL fragment following a page history change auto-event action.
  • Old History Fragment – The previous URL fragment.
  • New History State – An object containing the new history state.
  • Old History State – An object containing the old history state.
  • History Sources – The event that initiated the history change.

Tracking Form Submits with GTM Codes for SEO Goals

One of the best features of Google Tag Manager SEO is its ability to track form submits. That’s useful to webmasters who are tracking conversion analytics to reach SEO goals.

To track form submits, you need to set up a Form trigger within GTM. The settings for the trigger are as follows:

form submits

  • Wait for Tags – GTM will halt the form submit until all tags that use the trigger have fired or the timeout limit is reached. The default timeout is two seconds.
  • Check Validation – Google Tag Manager won’t fire the trigger event if the form submit fails validation. For example, if a user didn’t enter a mandatory field such as zip code, then the trigger event won’t be fired.
  • Enable When – Determines which pages the SEO tag manager should listen for submissions.
  • Fire On – You can specify that the trigger event gets fired when a variable (for example, form ID) is equal to a specified value.

We’ve already seen the tag manager SEO variables associated with form submissions. You can use those to simplify form tracking to reach SEO goals.

If you’re interested in getting really sophisticated with your form tracking, you can use JavaScript to track field values. Be careful here, though, as Google Analytics will cancel your account if you start tracking personally identifiable information (PII).

You can, however, track all types of input variables from a form, including text fields, radio buttons, check boxes, and drop-down lists.

Perhaps best of all, though, is you can track form abandonment. That will give you some insight as to whether your form has too many fields to fill out. Then you can adjust your form accordingly to reach your SEO goals faster.

Track custom Google Analytics Events For SEO Goals

GTM also allows you to track custom GA events (such as a click on a specific page) for tracking purposes.

Note that there’s a difference between GA events and GTM events. GA events are hits sent in response to GA tags fired from GTM. GTM events are user interactions with web page elements (called DOM elements).

Of course, to track customer GA events, you must first have added a Google Analytics page tracking tag. Make sure the tag fires on all pages.

To enable Google Tag Manager to track URLs that visitors click on, we’ll use a pre-defined variable that we’ve already seen: the Click URL variable.

Just fire up GTM and click on “Variables” on the left-hand navigation. Then, check the box next to “Click URL.”

Then, click on “Triggers” on the left-hand navigation and create a new Click trigger. Use the following settings:

  • Type: Click
  • Target: Just Links
  • Check “Wait for tags”
  • Leave the default of Max wait time (2000ms) alone
  • Uncheck “Check validation”
  • Enable When: Click “URL contains” and then select a unique part of the URL you’d like to track
  • Fire On: All Clicks
  • Save the trigger with a descriptive name

Now, for that same trigger, you need to add a GA event tracking tag to see if you’re nearing your SEO goals. Click on “Tags” on the left-hand navigation and create a new tag with these settings:

  • Tag: Universal Analytics
  • Click on “Triggers”
  • Name: Anything descriptive
  • Tag Name: Again, anything descriptive but it should include “UA” in it for “Universal Analytics”
  • Track Type: Event
  • Category: Nav
  • Select “Action”
  • Label: Another descriptive name
  • Save the tag with a name that identifies it

Finally, publish the tag.

That’s it. Now you’re tracking custom GA events in hopes of reaching your SEO goals.

Tracking SEO Goals with GTM Frequently Asked Questions

1. Can I track SEO goals for two different URLs on two buttons with the same code in GTM?

Yes, the event will be tracked if the code is firing properly on all pages. This applies to tracking the button click by class or ID.

2. What is the Preview & Debug mode in Google Tag Manager?

This is the testing phase of the SEO tag manager. Once you click the “Preview” button, an orange notification will appear notifying you that you are currently previewing.

Next, open the site that you are tagging, and you should see a “Debug” panel at the bottom of your screen. This panel displays an array of helpful information including tags, triggers, and data layer.

If you look at the left side of the Debug panel, you will see a timeline summary for your event. You should see a minimum of three categories including Page View, DOM Ready, and Window Loaded. If any of these are not visible, there is a problem with your event.

3.  Can I fix any problems after I’ve already published the tag?

Yes, you can download the free Chrome extension known as Google Tag Assistant to ensure that all of your tags are firing correctly to reach your SEO goals.

This system uses three different colors (green, blue, and red) as indicators. Green means that your tags are working well, blue signifies that improvements can be made to optimize those tags, and red is an indicator that the tags are not working.

4. Can I go back to previous versions of my container?

Yes.

Once you publish changes in GTM, you create a new version of your container for tracking SEO goals. You can always revert back to a former version of the container by clicking on “Versions” located near the top of your GTM dashboard. You will then be presented with a list of past versions. Choose which one you want to implement, select “Action”, and finally hit “Publish.”

5.  What are the best uses for GTM for SEO Goals?

The best uses for GTM for SEO goals are:

  • Event/Form Tracking – Tells you where your customers are in their journey and how they got to your site. Knowing this information will help you figure out how to close the deal and raise your conversion rate.
  • Metadata Injection – This gives you the ability to edit SEO features (page title, meta descriptions, etc…) in GTM.
  • Schema Implementation – Provides extra signals for Google to understand the content of your website. This improves your chances of showing up in featured snippets in Google search results.
  • Improved PageSpeed Score – If you implement your script resources through a GTM HTML tag, it will not negatively impact your PageSpeed Score. It could actually improve it.

Wrapping Up Google Tag Manager for SEO Goals

As with anything else in IT, be sure to test in an isolated environment before rolling out your changes to production.

Make sure that you’re tracking the correct data for your specific SEO goals, otherwise, you could end up making bad decisions based on inaccurate information.

Related Posts

  • Get Into Google News, Learn Google News SEO Now

    Google News is an important part of Google. Delivering over 6 billion website clicks per…

  • Tips for Google News Sites SEO

    Matt Cutt's Gives Tips for Google News Sites SEO Optimizing for Google news is different…

  • Google Recommends pushState for Ajax SEO

    For those of you who work in search engine optimization, you probably know that optimizing…

About John Lincoln

John Lincoln (MBA) is the CEO of Ignite Visibility, a top performance marketing agency backed by Mountaingate Capital. A digital marketing strategist and keynote speaker, Lincoln has managed over 1,000 marketing programs for brands like DoorDash, HBO, Tony Robbins, and Experian. Under his leadership, Ignite Visibility has been named a leading digital marketing agency in the U.S. and made the Inc. 5,000 list six times. Lincoln also spearheaded the development of CertaintyTech, a cutting-edge media mix modelling and forecasting platform. An award-winning marketer, Lincoln has authored three books, including Advolution (2022), and produced films such as SEO: The Movie. Recognized as a Top Business Leader, he has been featured in Forbes and The New York Times and spoken at global events like Web Summit and SMX. Lincoln's mission is to empower businesses through innovative digital strategies while reinvesting in clients, employees, and the community.

About Ignite

Ignite Visibility is a premier full-service digital marketing agency. We were founded in San Diego, CA but are now a 100% remote-first company with Igniters and clients around the globe.

Ignite Visibility is one of the highest awarded digital marketing agencies in the industry, works with some of the biggest brands in the world and is a 6x Inc. 5000 company.

noun-trading

Our Services

Ignite Visibility offers Award-Winning Services including comprehensive full-funnel digital marketing strategies. Learn more about our most popular service offerings below:

  • SEO Search Engine Optimization
  • PPC Pay Per Click
  • Email Marketing
  • Social Media
  • Creative
  • View All Services

Contact Us. Let’s Chat!

  • This field is hidden when viewing the form

Marketing Guides

SEO In 2020: How To Prepare For Major Disruption

"SEO: The Movie" - Have You Seen Our Film? Watch Now

"Social Media Marketing: The Movie" - Have You Seen Our Film? Watch Now

Amazon Seller Central vs Vendor Central

Listen To The Podcast Featuring The Best Minds In Marketing

John Lincoln Interviews Global Director of Digital Marketing & Strategy at Qualcomm, Jessica Jensen

Check Out 227 Free Online Marketing Classes

The 2020 Guide To Dominating SEO With Advanced Schema

Learn More About Our Digital Marketing Agency

Learn More About Our SEO Services

Learn More About Our Paid Media Services

SELECT CATEGORY

Become A Contributor

Interested in writing for Ignite Visibility?

APPLY NOW

noun-chat

Let's Chat

Ready to grow your online visibility and sales?

Request Your Free Proposal

Work With Us

NEWSLETTER // SIGN UP NOW










noun-strategy

Free Marketing Resources

  • Digital Marketing Resources
  • Marketing Strategy Videos
  • Weekly Marketing News Recaps
noun-strategy

Most Popular Blogs

  • How Long Does SEO Take?
  • Multi-Location SEO: Top Strategies
  • Google AI Overviews: Everything You Need to Know
  • Technical SEO 101
  • 18 Google Ad Extensions You Should Use
  • Complete Guide to Google Responsive Display Ads
  • Capitalizing on Local Service Ads
  • How SEO and PPC Work Together
  • Community Management Best Practices
  • B2B Social Media Marketing Guide
  • VIEW ALL BLOGS
noun-letter

Join Our Newsletter

CONNECT WITH US

  • facebook
  • twitter
  • instagram
  • youtube
  • linkedin

Services

  • Search Engine Optimization
  • Generative Engine Optimization
  • Pay Per Click Management
  • Social Media Marketing
  • Email Marketing
  • Conversion Rate Optimization
  • Website Design & Development
  • Creative Design
  • Content Marketing
  • Digital PR
  • Franchise Marketing
  • Digital Marketing Agency Services

About

  • Our Team
  • Our Values
  • Clients
  • Industry
  • Reviews
  • Careers
  • Marketing Resources
  • Privacy Policy & Service Terms
  • Advertising Disclosures
  • Sitemap

Contact

4370 La Jolla Village Drive
Suite 320
San Diego, California 92122

619.752.1955

Join The Newsletter

Sign up for our newsletter to get the latest from Ignite Visibility.











google parther logo

©2025 Ignite Visibility. All Rights Reserved. Privacy Policy and Terms of Service