X

How Google Tag Manager can save your SEO: 3 simple hacks

On Friday 15th of September, Sébastien Monnier, founder of Woptimo and member of Nubo network, attended as a speaker at the famous Brighton SEO conference. You will find the slides of the presentation at the end of this article.

At this event, he was able to present a very interesting topic which unites two major expertises of Nubo network: SEO and Analytics. The idea is to use an Analytics tool called a TMS (Tag Management System), normally created to launch tags on a website, but with SEO purpose. In this example, we use Google Tag Manager.

In this article, we will show you 3 simple hacks that you can do with GTM to improve the SEO of your website. But first, let’s see the basics.

What is Google Tag Manager

GTM is a tracking code management. That means you can trigger any kind of JavaScript with GTM: Google Analytics of course, but also Google AdWords Conversion tag, Facebook pixels, Hotjar scripts or any JavaScript code you want to launch.

We can make a comparison. GTM is 1 script to rule them all. You do not need to install any other tracking script on your website. You can configure everything through GTM’s back office.

GTM actually works a little bit like a JavaScript injector. This is a serious security breach if you leave your Google account unprotected, but this is also a really good opportunity to do things you would never have dreamt of without it.

Since we are web analysts but also SEO specialists, we wondered how we could use GTM for SEO purpose as well. Can it help? But before answering this, we have to wonder how far Google Bot can really use JavaScript for indexing.

JavaScript and SEO: does it work?

10 years ago, JavaScript was a complete no-go on websites for SEO. But things have changed and now Google can understand a lot.

And before starting, we have to warn you. Everything in this article is NOT good practice. This is border line SEO. It is always better to do hard-coded HTML optimisation rather than using GTM, but the technique we’re showing is a good replacement when things go wrong or when it doesn’t go the way we would want it to be.

And hopefully, we can help you today to get around some major SEO roadblocks. Let’s take 3 examples.

3 SEO hacks with GTM

Title and description

It is so common to have a client with a buggy CMS or with no CMS at all and he still cannot change the title easily. Or for example, category pages should always follow the same pattern without any flexibility. This is quite difficult when you want to optimize category by category.

But, do you know that you can change your title with JS with just 3 lines of codes. In this example, I just get the HTML code in JS and replace a bad content with something more optimised with even a special character that can be very attractive in the SERP.

Then I associate with the right trigger, I publish my content and I wait… for not so long. Just a few days, even hours and the new title is there!

Oh yes, we did the test. We did put a very specific keyword dynamically through JavaScript and we did rank for this keyword even though it was nowhere to be found anywhere in the HTML code or anywhere on the web. We have not tried for competitive keywords yet but there is no reason to think it would have less weight.

Some tip about title and description. Do not hesitate to grab a piece of your HTML page and insert in the title. For example, one our clients in the travel industry had always the same pages for his category pages. We dynamically extracted country and city and we did optimize title with it through GTM. It had a very good impact on SERP, CTR and ranking!

Here are a few examples on how you can use it :

  • For products on sale for a short period of time, you may not have the opportunity to publish a new title, … you can quickly do it the dirty way with GTM
  • Your search results pages are indexed but always with the same title no matter the criteria. Extract it from your DataLayer or HTML code and optimize
  • The last example, you can use your stock in real time and play the emergency card. Only 10 products left, say it in the title dynamically.

Faceted navigation

Sometimes we cannot control properly faceted navigation. This happens a lot and Google just goes mad indexing way too many pages or not enough but definitely not what you have planned as a good SEO.

Yes, you can add nofollow, canonical, noindex and all your favourite SEO-approved HTML tags, all with some simple JavaScript.

And it does work, magically, you get pages indexed or noindexed, or you save some bot time, just with a few hacks.

But keep in mind that it is always better with hard coded HTML. Do this only when there is no other option.

Data collection

As you know, a good SEO needs data! A lot of data sometimes and GTM can definitely help you with that. Contrary to the two previous examples, this last trick is not border line, it’s completely clean. You can use GA’s custom dimensions to collect SEO data in Analytics: this gives you the opportunity to add data in GA and you can find some pretty solid information.

For every page, you can send for example canonical, hreflang, h1, meta robots or any other SEO information you would find relevant like meta description., and you can get some nice information.

For example how many people actually visit noindex pages. You may realize you have too many noindex pages that could be useful for users.

Another example, bad hreflang, very useful to send the hreflang pointing to your main locale and see how other languages behave. In here, German pages should definitely have the hreflang to the English equivalent, not the home page.

Other use: classic, but still useful, no H1. Find pages that you forgot to work on. And remember that what is sent to GA stays in GA. I mean that if you send H1 on every page, you basically get a history of all the H1 you ever had on your sites, which can be very useful.

Important to know: what you send to GA is actual data as seen by a user. If a page has no visit, you will get no data… this is not like in a crawler such as Screaming Frog. A crawler will check all pages it can find but may miss some landing pages or pages that are not easily accessible. These are 2 different things, 2 analysis that can help find very insightful data.

Get the power now

Reading this article, you understood quite quickly that with GTM, you got a lot of power to change your website. Use it wisely but don’t hesitate to use it since it’s actually quite simple and very effective!

 

View Comments (0)

Related Post

This website uses cookies.