Google Warns On Using JavaScript For Structured Data

Jun 20, 2024 - 7:51 am 0 — by

3d Printer Google Logo

In the Google Merchant Center structured data documentation, it says that you should add structured data to the HTML source and that it "can't be generated after a page has been loaded using JavaScript." This does not mean Google cannot process the structured data on the page if generated using JavaScript, but rather that it makes it harder for Google to do so.

Here is a screenshot of that line:

Gmc Structured Data Js Warning

Jarno van Driel posted about this on LinkedIn and said, "Google Search Central documentation explains how to add structured data markup via JavaScript, yet Google Merchant Center documentation mentions markup shouldn't be added after a page has been loaded." He asked, Which of the docs is correct?

Ryan Levering from Google chimed in and said technically both are right and Google needs to adjust the wording on the doc. He said, "We are working at finding the right wording to explain this discrepancy currently." He also warned "against running off and re-implementing your websites," if it works now, leave it.

He then goes on to explain that Google Merchant Center crawlers can and do process structured data when generated with JavaScript but they have seen quality and inconsistency issues with these implementations, so they recommend you do not use it.

He wrote:

It's not that GMC crawler can't ever render JS, but rather that there are more often quality problems with the rendering and discrepancies when sites do things like have one price on raw HTML load and then update that with a strikethrough price on render. It gets tricky when the markup is loaded one way on page load and then changed or rendered on top via JS.

So if the HTML source rendered and said one thing and then the JavaScript changes that later, it can confuse Google in some cases.

In terms of the documentation, he said, "I think it was easier to write in GMC to just say that it should be in the original page load and we're re-examining that phrasing now. In general if you have that ability that's likely going to be more consistent with all our systems, but it would be untrue to say that you can never do this."

Four years ago, Google came up with its structured data using JavaScript documentation - as a reminder.

Forum discussion at LinkedIn.

Update: Ryan posted on LinkedIn in response to the title of this story:

Maybe not exactly the spin I was trying to put on it :)....I was mostly saying that GMC is currently worded a bit more harshly than it should be. GMC currently says "You can't do this" which is what Jarno pointed out and I was saying it's just a recommendation.

 

Popular Categories

The Pulse of the search community

Google Search Volatility

More Details

Search Video Recaps

 
Video Details More Videos Subscribe to Videos

Most Recent Articles

Google Updates

Google Search Ranking Volatility Gets Heated October 24th

Oct 25, 2026 - 10:07 am
Search Forum Recap

Daily Search Forum Recap: October 23, 2026

Oct 23, 2026 - 10:00 am
Search Video Recaps

Search News Buzz Video Recap: Google Search Chatter, PHP Exploit, AI SEO Worthwhile, Google Local, Google Ads, ChatGPT Ads & More

Oct 23, 2026 - 8:01 am
Google

Google AI Overview Citation Cards With AI-Generated Summary Snippets

Oct 23, 2026 - 7:51 am
Google Search Engine Optimization

JPEG XL Image Format Not Supported By Google Images & Google Discover

Oct 23, 2026 - 7:41 am
Google Maps

Google Business Profiles Tests New Advanced Performance Reports

Oct 23, 2026 - 7:31 am
Previous Story: Most Google People Also Ask Responses Are Wikipedia