Google Warns Against Using JavaScript for Structured Data in Merchant Center

June 20, 2024 at 1:43:52 PM

TL;DR Google's Merchant Center advises adding structured data directly to the HTML source rather than using JavaScript post-page load, as it complicates processing. While Google can handle JavaScript-generated data, it often causes quality and consistency issues. Ryan Levering from Google clarified that both Google Search Central and Merchant Center guidelines are correct but need better wording. He cautioned against re-implementing websites if they currently work.

Google Warns Against Using JavaScript for Structured Data in Merchant Center

Google Merchant Center's structured data documentation advises adding structured data to the HTML source and not generating it post-page load using JavaScript. This doesn't mean Google can't process JavaScript-generated structured data, but it complicates the process. Jarno van Driel highlighted this on LinkedIn, questioning the discrepancy between Google Search Central and Google Merchant Center documentation.

Ryan Levering from Google clarified that both documents are technically correct, but the wording needs adjustment. He advised against re-implementing websites if they currently work, noting that Google Merchant Center crawlers can process JavaScript-generated data but often encounter quality and inconsistency issues. For example, discrepancies can arise when prices are updated via JavaScript after the initial HTML load.

Levering explained that the recommendation to avoid JavaScript for structured data in Google Merchant Center documentation was to ensure consistency across systems. However, he acknowledged that it's not entirely accurate to say JavaScript should never be used for structured data.

In summary, while JavaScript can be used for structured data, it is generally more reliable to include it in the original HTML source to avoid potential issues.

Have more questions on this topic? Ask our AI assistant for in-depth insights.

The Only Digital Marketing Feed You'll Ever Need.

Stay informed your way. Tailored updates when and how you want them. 100% Free.

10,000+ Users

500+ Sources

1000+ Tools

Or

Related Posts

Google iOS App Adds Page Annotation Opt-Out Option for Publishers

Google iOS App Adds Page Annotation Opt-Out Option for Publishers

Google
Google

Official Source

Official Source

Google is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Google Updates Search Ranking Systems Documentation with Site-Level Signal Clarification

Google Updates Search Ranking Systems Documentation with Site-Level Signal Clarification

Google Search Central
Google Search Central

Official Source

Official Source

Google Search Central is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Google updates site reputation policy to include first-party content oversight

Google updates site reputation policy to include first-party content oversight

Google Search Central
Google Search Central

Official Source

Official Source

Google Search Central is a Official Source. The source has been verified by Swipe Insight team.

Official Source
The Ultimate Google Analytics Audit Tool

The Ultimate Google Analytics Audit Tool

Sponsored
GA4 Auditor
GA4 Auditor

Verified Sponsor

Verified Sponsor

GA4 Auditor is a Verified Sponsor. Want to get featured here? Contact us.

Verified Sponsor
Google Launches AI-Powered Shopping Tools for In-Store and Local Shopping Experience

Google Launches AI-Powered Shopping Tools for In-Store and Local Shopping Experience

Google
Google

Official Source

Official Source

Google is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Justice Department Pushes Google to Spin Off Chrome Browser Trending ️‍🔥

Justice Department Pushes Google to Spin Off Chrome Browser

Google Launches Learn About AI Tool for Enhanced Educational Experience

Google Launches Learn About AI Tool for Enhanced Educational Experience

Google
Google

Official Source

Official Source

Google is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Google Announces Multiple Search Updates and Feature Changes

Google Announces Multiple Search Updates and Feature Changes

Google Search Central
Google Search Central

Official Source

Official Source

Google Search Central is a Official Source. The source has been verified by Swipe Insight team.

Official Source

Related Tools

GA4 Auditor logo

GA4 Auditor

Verified Tool

Verified Tool

GA4 Auditor is a Verified Tool. Want to get this badge? Contact us.

Verified Tool

Automated GA4 audits with actionable insights

Get Featured Here

Showcase your tool in this list.

Contact Us
Surfer SEO logo

Surfer SEO

SEO content creation and optimization made easy

SEO
Sitebulb logo

Sitebulb

Efficient website crawler for better SEO audits

SEO
Screpy logo

Screpy

AI-Powered SEO and Web Analysis Simplified

SEO
Blogify logo

Blogify

Convert multimedia to SEO-optimized blogs fast

SEO
GoDataFeed logo

GoDataFeed

Optimize and manage product feeds across channels

Feed Management
Feedonomics logo

Feedonomics

Optimize and sync product data for more sales

Feed Management
Answer the Public logo

Answer the Public

Unlock Consumer Insights for Content Creation

SEO
Ahrefs logo

Ahrefs

SEO tools to boost traffic and rank higher

SEO
SEO Writing AI logo

SEO Writing AI

AI-powered SEO content in 1 click

SEO

Get Featured Here

Showcase your tool in this list.

Contact Us