Notification

This help center shows articles applicable to Merchant Center Next. Learn more about the upgrade and get answers to frequently asked questions.

Set up structured data for Merchant Center

This article outlines how to implement structured data markup for your product data.

On this page


Getting started

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's 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, the following conditions must be satisfied:

  • There's 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 [gtin] attribute). This can be useful if you show multiple variants of the same product (for example, different sizes or colors, or related products) on the same landing page.
  • Structured data markup must be present in the HTML returned from the web server. The structured data markup can’t be generated with Javascript after the page has loaded.
  • Your landing page content, including pricing, must not dynamically change based on user information such as IP address or browser type.
  • Structured data must match the values that are shown to the user. Providing incorrect data on your product landing pages is a violation of our web developer guidelines.

If at least one of these conditions isn’t met, the products on your landing page won’t match your product data.

The schema.org section on machine-understandable versions of information provides help on understanding and clarifying your structured data.


Add structured data markup

JSON-LD markup

To add structured data markup to your site, we recommend you add this as JSON-LD to your HTML markup. Refer to the Introduction to structured data markup in Google Search for more information.

JSON-LD 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.

If you use an e-commerce platform on your site, you may need to make some changes to the platform template or code before adding your structured data. In addition, your site should be able to support JavaScript for template and page level applications.

Tip: The code that generates your structured data needs to be kept in sync with any changes to the user-facing elements on your site.

Example

JSON-LD

{

  "@context": "https://schema.org/",

  "@type": "Product",

  "sku": "trinket-12345",

  "image": "https://www.example.com/trinket.jpg",

  "name": "Nice trinket",

  "description": "Trinket with clean lines",

  "gtin": "12345678901234",

  "brand": {

    "@type": "Brand",

    "name": "MyBrand"

  },

  "offers": {

    "@type": "Offer",

    "url": "http://www.example.com/trinket_offer",

    "itemCondition": "https://schema.org/NewCondition",

    "availability": "https://schema.org/InStock",

    "price": "39.99",

    "priceCurrency": "USD"

  }

Added structured data markup can appear anywhere in the HTML source, but we recommend putting Product structured data in the initial HTML for best results.


Products and Offers

Your landing pages should contain both:

  1. A Product object, which describes the product
  2. A nested Offer object in the offers field, which describes how this product is sold

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 time, make sure the sales price is provided in the structured data.

Important: Some product spec attributes are not supported by schema.org. Specifying the following schema.org values is required for automatic item updates: price, priceCurrency, availability and condition. Learn more about Supported structured data attributes and values.


Test your markups

Test your schema.org implementation with Search Console or the Rich Results Tool. Visit the Rich Results Test or the Google Search Console Help Center to learn more about using the tool, debugging any issues, and interpreting your results in the tool.


Required structured data for product pages with in-store availability

If you have opted into Local inventory ads with product pages with in-store availability, you can add the additional structured data markup from the table below to your nested Offers, to show in which physical stores the product is sold:

Note: Schema.org markup can be used on web pages written in any language. The markup, like HTML, is in English. Schema.org values are case-sensitive.

Schema.org value Product or inventory feed specification value Value type
Product > offers > availableAtOrFrom > branchCode store code A unique alphanumeric identifier for each local store. You must use the same store codes that you provided in your Business Profiles.

Required structured data for store pickup offers

If you have opted into Local inventory ads with product pages with in-store availability and pickup later or pickup today, you can add the additional structured data markup from the table below to your nested Offers, to show in which physical stores the product is available for pickup:

Note: Schema.org markup can be used on web pages written in any language. The markup, like HTML, is in English. Schema.org values are case-sensitive.

Schema.org property Product or inventory feed specification value Value type
Product > offers > availableDeliveryMethod -- The OnSitePickup schema.org value indicates product is available for in-store pickup.
Product > offers > potentialAction pickup method The BuyAction schema.org value indicates that the product can be purchased online for in-store pickup. The ReserveAction schema.org value indicates that the product can be reserved online for in-store pickup.
Product > offers > deliveryLeadTime pickup sla The delivery lead time should only be a 1 or a 0. This is used to indicate the estimated number of days until the item is available for pickup, as follows:
0 = Same-day
1 = Next-day

Learn more About structured data for Merchant Center.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Main menu
2043073905343397527
true
Search Help Center
true
true
true
true
true
71525
false
false