Set up structured data for Merchant Center
This article outlines how to implement structured data markup for your product data. Before getting started, review About structured data markup for Merchant Center and verify that your site meets the requirements. For general guidelines for structured data beyond your Merchant Center product data, visit Schema.org's getting started guide. We also recommend using Search Console to troubleshoot structured data related issues as well as measure your site's search traffic and performance.
To add structured data markup to your website, you need to be able to access and edit your site’s HTML, or your shop system’s template configuration. Markup is an HTML tag annotation that lets search engine crawlers and bots know that there is product data on your site and helps the systems reliably understand the data.
In order for Google’s crawler to match the structured data to your product data, one of the two following conditions must be satisfied:
- There is a single offer on the landing page
- If there are multiple offers on the whole page, each offer present on the page is annotated with a SKU or a GTIN and the respective offer in your product data on Shopping has the same SKU ('
id' attribute) or GTIN ('
gtin' attribute). This can be useful if you show multiple variants of the same product (e.g. different sizes or colors, or related products) on the same landing page.
If at least one of these conditions isn’t met, the products on your landing page won’t be able to match to your Google Shopping product data.
For more in-depth information about setting up structured data markups on your website, please visit schema.org’s getting started guide. The Schema.org section on machine-understandable versions of information provides help on understanding and clarifying your structured data.
Add structured data markup
To add structured data markup to your site, you will either need to augment existing HTML on your site or create a new markup. In addition, you will need to determine if JSON-LD (recommended) or microdata best fits your needs.
Add new structured data markup (recommended):
We recommend you add new structured data markup with JSON-LD, separate from your HTML markup, especially if your product data contains variants. Added markups are distinct from any user-facing code, which makes it easier to maintain. Any structured data markup specifically designed for Google usage can be added without changing any of the visual elements of your site. Note that the code that generates your structured data needs to be kept in sync any changes to the user-facing elements on your site.
"name": "Example Test",
"description": "This is just a boring example",
<span itemscope itemtype="http://schema.org/Product" class="microdata">
<meta itemprop="image" content="test.png">
<meta itemprop="name" content="Example Test">
<meta itemprop="description" content="This is just a boring example">
<span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<meta itemprop="price" content="119.99">
<meta itemprop="priceCurrency" content="USD">
Augment your existing content with structured data markup
If you chose to augment your HTML, you will need to have existing HTML tags that surround product data on your site. In some cases, it might be necessary to add new HTML tags.
Usually, data augmentation can be done through HTML template edits and typically require minimal backend code changes. When you augment your data, information that is already on your site is reused for the structured data markup.
This example contains product data that has been augmented with structured data markup– the additions are highlighted.
<div class=”product-details” itemscope itemtype="http://schema.org/Product
<span class=”label”>Product Name:</span>
<span class=”info” itemprop="name"
>This is just a boring example</span>
</div> itemprop="offers" itemscope
<meta itemprop="priceCurrency" content
<span class=”price”>$<span itemprop="price">119.99</span></span>
Products and Offers
Note that the price must be specified with a full stop, not a comma, as a decimal separator. If you show the price in multiple currencies on the landing page, you can use multiple objects of type Offer. When you use multiple Offer objects, you'll also need to use the
priceCurrency [priceCurrency] attribute to specify currencies.
If a sales price is shown on the landing page and this price is what a user would actually pay at that point in time, make sure the sales price is provided in the structured data.
Important: Some product spec attributes are not supported by schema.org. Visit the supported structured data attributes page to learn more. Specifying
priceCurrency [priceCurrency] and
availability [availability] is required for automatic item updates.
Test your markups
Test your Schema.org implementation with Search Console or the Structured Data Testing Tool. Visit the Google Search Console Help Center to learn more about using the tool, debugging any issues, and interpreting your results in the tool.