Google’s John Mueller advises SEOs not to implement structured data using Google Tag Manager.
While this is something that technically can be done, it’s better to embed structured data directly on the page.
The topic of adding structured data via Google Tag Manager has come up before, but it seems SEOs aren’t getting the message.
Over the past week alone I’ve noticed Mueller address the topic twice on Reddit and once on Twitter.
His advice is always the same: You can add structured data with Google Tag Manager, but you shouldn’t.
As Mueller explains, Google’s algorithms only use structured data when it’s visible on the page.
“On-page SEO should really be visible — it’s hard for Google’s algorithms to give something appropriate weight if we determine that it’s never visible. For example, when adding structured data, our goal is to only use it when we see that it’s visible on the page.”
Mueller echoed his own advice when the topic came up on Twitter yesterday.
Can anyone explain why my JSON-LD markup isn't being found when I add it via Google Tag Manager? I've checked the HTML, corrected errors, set up a new tag, applied relevant triggers and it's still not being found when I test in SDTT 😭 @badams @basgr @JohnMu
— Daniel Brooks 🤓🔍 (@seodanbrooks) February 21, 2019
Note that Google’s own structured data testing tool can’t read the markup when it’s implemented via Google Tag Manager.
Barry Adams responded saying the best solution is to include it in the page’s HTML.
Mueller seconded Adams’ response:
I'd second Barry's comment — while you can use GTM to add SD to pages, and some people do, it's more complex and brittle. I'd really try to put the JSON-LD directly on the page.
— 🍌 John 🍌 (@JohnMu) February 21, 2019
Earlier in the week, Mueller gave a similar response on Reddit. If you want the structured data to be used, make it easy for Google to see it.
So, there you have it. Don’t use Google Tag Manager to implement structured data. At least not if you want Google to read it.
If Google can’t read it, what’s the point of it being there at all?
- SEO for Rich Results: How to Find & Fix Structured Data Errors
- What is Schema Markup & Why It’s Important for SEO