Site icon RankWatch Blog

4 Best Uses of Google Tag Manager for SEO

universal analytics

google tag manager

Before I dive into the actual content of this post, I want to flash back to 1979, when the Buggles released one of the catchiest one-hit wonders of all time: “Video Killed the Radio Star” (give it a listen if you’ve never heard it before). The lyrics lamented the fact that music videos had now come to dominate radio as the medium by which people hear songs (all of which is ironic considering that “Video Killed the Radio Star” was the first music video to ever air on MTV). It harkens back to a simpler time, before technological advances brought on “the problems you can see…Oh-a-Oh.” However, it also hit upon an exciting trend in society: music videos were taking over as the better way to experience music.

Return now to 2018, where we’re experiencing a similar transformation in the SEO world. Although not quite as catchy as the song above, “Google Tag Manager killed Google Analytics.” I’m being somewhat facetious here, as Google Tag Manager is simply a more advanced deployment of Google Analytics. What I mean to say is that Google Tag Manager is replacing Google Analytics as the web tracking code of the future.

Google Tag Manager should be every SEO’s best friend, especially when working with slow or uncooperative developers. Not only do you have the ability to enable Google Analytics tracking through Tag Manager, but you also have the ability to perform a host of other functions, including event tracking, code injection, and AdWords & Remarketing tagging. The best part is that most of these can be implemented directly through the Tag Manager interface: with few exceptions, there is no additional onpage code required. This feature alone has saved me hours in the past for projects that would have otherwise required endless back and forth with a development team.

Based on my experience, and those of my colleagues at Go Fish Digital, here are the 4 best use cases of Google Tag Manager for SEO:

  1. Form/Event Tracking
  2. Schema Implementation
  3. Metadata Injection
  4. Improved PageSpeed Score
  1. Form/Event Tracking

At the end of the day, your goal with SEO or any other digital marketing should be to drive more business to your or your client’s site. With that in mind, having proper event and conversion tracking on your site is crucial. Tracking where your customers are completing their customer journey, what source they arrived from, and the path they took for that journey are all important components of that tracking.

The events you can configure in Google Analytics are a great way to record this event tracking. However, implementing these events using traditional Google Analytics tracking code can be a royal pain in the neck. Let’s look at the RankWatch “Contact Us” form as an example:

This form encompasses some 20+ lines of code on the site. In order to track this form with conventional Google Analytics code, you would need to add <event> code to the HTML on the page specifically connected to the submission of this form. This is cumbersome and time-consuming. Debugging this event tracking code may require several iterations and corrections, and as I mentioned earlier, if you work with any 3rd party developers, even simple HTML edits such as this can often feel like you’re pulling teeth.

Instead, how would this look if we were to set up a trigger in Tag Manager? Exactly like this:

That’s all. Badda bing badda boom. On top of that, one of the best parts of Tag Manager is the ability to debug in a preview mode before needing to publish your workspace. So if you go to test your form and it doesn’t work, instead of endless back-and-forth with a developer, you can debug and test new versions on the spot.

From there, it’s extremely simple to create a Google Analytics Event tag tied to that form submission trigger:

All of those fields can be customized and edited as needed, including adding a monetary value to that event completion. And, voila! You’re tracking a conversion event on the site.

2) Schema Implementation

Another great use of Google Tag Manager for SEO is for injecting schema onto a site. Schema is a type of semantic markup for a site that can provide additional signals to Google and other search engines about the content of the site. Although not a direct SEO ranking factor, proper use of schema can improve your chances of getting featured snippet results, knowledge panels, and other types of rich results in Google. 4 of the best ways to improve your schema for these rich results are through Organization, LocalBusiness, BreadcrumbList, and AggregateRating schema, all of which can have a direct effect on the information displayed about your website in search results.

Although schema can be implemented directly through a site’s HTML, you can run into many of the same issues as above: unresponsive developers, edits that need to be made when Schema.org updates its protocols, and slow iterations of debugging. Instead, if you use Google Tag Manager, you can inject the schema directly onto a site through an HTML Tag. Here’s an example of what that looks like for our Go Fish Digital services page:

As you can see from Google’s Structured Data Testing Tool, this schema fires and is detected by Google without any warnings or errors:

The versatility and flexibility Tag Manager has afforded us has been invaluable as we experiment with new types of schema and adapt to updates in the SERP landscape.

3) Metadata Injection

Hat tip to my colleague Brian Gorman (@briangormanGFD ) for bringing this to my attention. Using the same HTML Tag as we used for schema injection in #2 above, we can also inject metadata directly on to a page. Metadata is important because it’s how a number of SEO features are added to a site. Some of the elements that are included as meta elements include:

  1. Page Title
  2. Meta Description
  3. Canonical Links
  4. Rel Prev/Next Elements
  5. Noindex tags
  6. Open Graph Markup
  7. Twitter Card Markup

As you can see, having the ability to edit these elements directly through Tag Manager gives you incredible control over a website’s organic presence. While most of these elements are generally editable through a site’s CMS, there are times when you either don’t have access to the CMS or don’t have time to wait for a developer to implement your recommendations. In those cases, Tag Manager is the way to go.

Here’s an example of what that metadata injection code looks like when adding a “noindex” tag to a page:

<script>

var m = document.createElement(‘meta’);

m.name = “robots”;

m.content = “noindex,follow”;

document.head.appendChild(m);

</script>

With all of that being said, this implementation of metadata is NOT foolproof. Simo Ahava, one of the most widely-regarded Tag Manager experts, outlined an experiment he conducted on dynamically added metadata in 2015. In his test, he tested dynamically inserting a meta description through Tag Manager onto different pages on his site. The result: intermittent success. Google didn’t use the dynamically injected meta description in all cases, but it did work in other cases, with no particularly clear pattern to distinguish the cases. His conclusion is similar to what we discovered: it’s best to deploy meta tags through the HTML page template as a default. However, you do have the option to deploy meta tags through Google Tag Manager if the need arises.

4) Improved PageSpeed Score

Who among us hasn’t at one point or another come across the dreaded PageSpeed score from Google? It always looks something like this:

And has recommendations like this:

 

For anyone who’s attempted to implement these suggestions, you’ve likely seen how difficult and tedious that can be. The good news is that sometimes, those script resources can be implemented through an HTML tag in Tag Manager. Since Tag Manager itself is just another script on the page, adding additional code to be injected through Tag Manager will not have a negative effect on your PageSpeed score. This means that if you can figure out an effective way to deploy scripts that are currently slowing down your page through Tag Manager instead, you have a good chance of improving your PageSpeed score.

Note that this method is entirely subject to the setup and configuration of your site and won’t necessarily work in all cases. However, especially in light of Google’s recent announcement that mobile page speed is now a ranking factor, if your site has been struggling with its PageSpeed score, this is a perfectly viable method to try and boost that score.

Google Tag Manager is a versatile toolbox with a variety of possible applications features. What I’ve outlined here is just the tip of the iceberg for creative ways to employ Google Tag Manager for SEO, and I’m sure there are other innovative methods that others have tried. If you’ve had any success with your own Tag Manager experiments, I’d love to hear about them! Leave a comment or email jr.ridley@gofishdigital.com and tell me what you’ve tried.

Exit mobile version