Google’s John Mueller advises SEOs against using Google Tag Manager for implementing structured data.
While it is technically possible, it’s preferable to embed structured data directly on the page.
This topic has been discussed before, but it seems SEOs are not getting the message.
Over the past week, I’ve noticed Mueller address this issue twice on Reddit and once on Twitter.
His advice remains consistent: You can add structured data with Google Tag Manager, but you shouldn’t.
Why?
Mueller explains that Google’s algorithms only use structured data when it’s visible on the page.
Mueller echoed his advice on Twitter recently.
A Twitter user asked why their JSON-LD markup isn’t being found when added via Google Tag Manager, despite checking the HTML and correcting errors.
Note that Google’s own structured data testing tool can’t read markup 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 structured data to pages, it’s more complex and brittle. It’s better to put the JSON-LD directly on the page.
Earlier in the week, Mueller gave a similar response on Reddit. To ensure structured data is used, make it easy for Google to access it.
So, there you have it. Don’t use Google Tag Manager to implement structured data, especially if you want Google to read it.
If Google can’t read it, what’s the point of it being there at all?