Schema Markup / GTM / GSC error

I’m using GTM to inject the json script into certain pages. For some reason on those pages Google Search Console doesn’t pick up the json script.
Schema.org validator shows the script is being injected and formatted properly.
And I can see the script when I inspect the page.
But not GSC (or Google Rich Results Test).
And I can copy the script into the custom code for each page in webflow and it works.

So the script seems fine, and GTM seems to be getting it on the page and it can be found at least by my inspecting and by the Schema Validator, but not by GSC. Which concerns me…

Any ideas what I’m doing wrong? Or what more information I can provide that might be of help?

I appreciate the help.


Here is my site Read-Only: [LINK](Webflow - NickBerry.info)
(how to share your site Read-Only link)

GTM injection likely won’t work due to the time it takes for the scripts to complete execution. Even basic async or defer scripts generally don’t work for schema injection IMO.

If you want to generate it with script, you probably need to make it synchronous and probably inline.

Ok. I may need to reconfigure my plan.
I’m creating the script for these pages outside of webflow, which I need to continue to do for now. What’s the simplest way for me to get it deployed? If I add it as a CMS item field am I able to deploy from there? I have fields dynamically deployed within scripts, but haven’t been able to get an entire script deployed as a field yet.
And thanks for your help, as always.
-Nick

You’ll need to use the approach I suggested above, or else pre-create your JSON and store it in the CMS.

You can do that in an embed inside of a rich text field.

Thanks. Pre-creating and storing it in the CMS is the direction I’m thinking, but I haven’t been able to get it deployed in the rich text field successfully. How do I go about that?

You just drop an embed in your rich text field and paste your JSON LD in.
Then drop an RTB element on your page and bind it to the field.

Nothing special happening there, I’m not sure which part you’re stuck on. The Webflow U docs will show you how to create the embed if you’re uncertain.

That worked, thank you! I’m not sure what I was doing wrong previously, but that little issue has been a thorn for me.

Now then should I be able to pre-create and then import the scripts into the CMS as well?
I’ve tried exporting and then re-importing, but it seems to change the script when it gets re-imported, removing the ‘application/ld+json’ tag.

You can store scripts the same way but they’re still scripts, and you’ll still have the same problem if you’re trying to generate JSON-LD with them. I would never do it that way, too difficult to manage.

Export and import, and the API have had longstanding issues with embeds. I believe some fixes were made recently regarding the API. I can’t give you any current recommendations there.

I generally don’t use scripts to generate JSON-LD. When I do, it’s inline script, not async/defer, and it’s stored in the page or sitewide code, or I build a reverse proxy to generate that script.

1 Like