Categories: SEO

Google Warns On Using JavaScript For Structured Data With Merchant Center

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:

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.

FOLLOW US ON GOOGLE NEWS

 

Read original article here

Denial of responsibility! Search Engine Codex is an automatic aggregator of the all world’s media. In each content, the hyperlink to the primary source is specified. All trademarks belong to their rightful owners, all materials to their authors. If you are the owner of the content and do not want us to publish your materials, please contact us by email – admin@searchenginecodex.com. The content will be deleted within 24 hours.

Share
Chris Barnhart

Leave a Comment
Published by
Chris Barnhart

Recent Posts

Why ‘Sends’ Matter More Than Ever

In a recent Instagram Reel, Adam Mosseri, the head of Instagram, revealed a top signal…

July 4, 2024

Google Shows How To Beat Reddit & Big Brands

In an interview published on YouTube, Google’s Gary Illyes offered advice on what small sites…

July 4, 2024

Daily Search Forum Recap: July 3, 2024

Here is a recap of what happened in the search forums today, through the eyes…

July 3, 2024

Google Ads Brand Exclusion Won’t Prevent Your Ads For Showing For Random Firms

The other day we reported about the new Google Ads brand controls. But as we…

July 3, 2024

Why Google Search Console Reporting Delays Are Not In Search Status Dashboard

As of right now, Google Search Console is having a significant delay with its Performance…

July 3, 2024

Google Search Current Styles Carousel

Google Search has a new shopping-related carousel named "current styles." This shows up for some…

July 3, 2024