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 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, and to measure your site's search traffic and performance. Additional guidance can be found in the Search Product structured data article, specifically the sections on Merchant Listings.
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 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
[id]attribute) or GTIN (GTIN
If at least one of these conditions isn’t met, the products on your landing page won’t be able to match to your 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.
Add new structured data markup (recommended)
We recommend you add new structured data markup with microdata separate from your HTML markup. Added markup is distinct from any user-facing code, which makes it easier to maintain. Any structured data markup specifically designed for Google use can be added without changing any of the visual elements of your site. Note: The code that generates your structured data needs to be kept in sync with any changes to the user-facing elements on your site.
<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">
<img itemprop="image" src=”test.png”>
<span class=”label”>Product Name:</span>
<span class=”info” itemprop="name">Example Test</span>
<span class=”info” itemprop="description">This is just a boring example</span>
<div class=”product-info” itemprop="offers" itemscope
<meta itemprop="priceCurrency" content="USD"/>
<span class=”price”>$<span itemprop="price">119.99</span></span>
Products and Offers
Note that the price must be specified with a period as a decimal separator, instead of a comma. 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 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 the following schema.org values is required for automatic item updates:
Test your markups
Test your schema.org implementation with Search Console or the Rich Results 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.