This post was originally published in June, 2019. Last updated: November, 2021.
This is a rich result (aka a rich snippet). Rich results display more data than regular search results. For example, while regular results display only a page’s title, URL, and meta description, rich results can also display product ratings, number of reviews, price ranges, and more.
Since you’re here, you probably want Google to display similar results for your Shopify store. For this to happen, you have to add structured data markup to your website, which can be a hassle.
You need to be tech-savvy. You must be familiar with Shopify Liquid, HTML, JSON-LD (JSON for Linking Data), and schema.org (data types and properties). But even if you are a skilled developer, you might find it difficult to define exactly what data types and properties you need to add to your Shopify store.
As Shopify experts, we help Shopify merchants add structured data to their stores through our Smart SEO app and through our customization services every day. In this article, we will summarize our experience and share the knowledge we’ve gained along the way. We will talk about what structured data is and how you can implement it. We will also tackle the specific schema.org data types and properties you should add to your Shopify homepage, product, collection, blog and article pages.
After you read this guide, you will realize that implementing structured data, intimidating at first glance, can be quite straightforward as long as you have the right information.
What you'll learn
- What is structured data & how can it benefit you?
- Structured data formats & schemas
- Before you implement structured data
- How to add structured data to your Shopify store?
- What structured data markup to add to your Shopify homepage?
- What structured data markup to add to your Shopify product pages?
- What structured data markup to add to your Shopify collection pages?
- What structured data markup to add to your Shopify blog page?
- What structured data markup to add to your Shopify article pages?
- Testing your structured data markup
What is structured data & how can it benefit you?
This is structured data markup:
A screenshot of shop.vanillapup’s HTML, February 6, 2020. To see the HTML of a page, right click (anywhere on the page) and select the ‘View Page Source’ option from the drop-down menu.
And this is the result of implementing structured data markup:
Structured data markup gives search engines more information about your website and its content. In the context of e-commerce, structured data can provide Google with valuable information about your products (e.g. pricing, availability, rating, number of reviews, etc.). It can also give Google detailed information about your business (e.g. logo, address, contact information, connected social media pages, founders, subsidiaries, etc.).
Why is it important that Google has this information?
Structured data allows search engines and web systems to read and better understand what your website is about. In this way, Google can present your products (and other web pages) in a more detailed and reliable manner. One important aspect of this is that Google uses structured data to create rich snippets. Google can also use the markup for your product pages to create automated product feeds for your Google Shopping Ads.
Google does not guarantee that you will get rich snippets even if your pages are marked up correctly. This is explicitly stated in Google’s Structured Data Guidelines:
But if you add structured data markup to your website, Google is more likely to give you rich snippets and in most cases it does.
Structured data formats & schemas
Structured data formats
As described in the Google Webmaster Blog, structured data formats “define a small number of fixed structures that can be used to encode descriptive data.”
There are 3 structured data formats:
Google recommends using JSON-LD for structured data.
The takeaway: If you’re using Microdata or RDFa, it is best to consider migrating to JSON-LD. JSON-LD is easier to add and update and it is compatible with dynamic data. In addition, if you use JSON-LD, you don’t have to change your HTML code to indicate where the structured data is. Learn more → PracticalEcommerce, To Grow Search Traffic, Add JSON-LD
Structured data schemas
Structured data schemas define terms for different types (e.g. “WebSite”, “Person”, “Organization”) and properties (e.g. “name”, “description”, “logo”). Structured data schemas include:
Data-vocabulary.org is outdated.
As of January 29, 2021, data-vocabulary.org markup will no longer be eligible for Google rich result features. To be eligible after January 29, 2021, you need to replace data-vocabulary.org markup with schema.org markup. Learn more about sunsetting support for data-vocabulary. (Source: Google Search Central, Understand how structured data works)
If you’re using data-vocabulary.org, you must replace your data-vocabulary.org markup with schema.org markup.
Now that you know what structured data is, why you should use it, and what is Google’s preferred structured data format (JSON-LD) and schema (schema.org), let’s have a closer look at what you need to do before you implement structured data.
Before you implement structured data
You must do 3 things:
- Define your main page types. For Shopify, the main page types are homepage, collection, product, blog, and article pages.
- Define what schema.org types and properties you must add to each page of your Shopify website: homepage, product pages, collection pages, blog page, and article pages. For example, this is how the structured data markup for a product page should look:
Source: schema.org, Product, Example 2, JSON-LD
As you can see from the screenshot, structured data consists of types. Each type is associated with a set of properties. Common properties of the Product type include productID, description, name, height, weight, mpn, etc.
Each type can contain other types (arranged in hierarchical order). For example, the Product type contains a set of Offer types. The Offer types are actually your product variants and contain properties like price, availability, etc.
The core vocabulary of schema.org currently consists of 792 Types, 1447 Properties 15 Datatypes, 83 Enumerations and 445 Enumeration members.
We’re only interested in a handful of them. But before we get to the actual types and properties you need to add to your store’s individual pages, let’s see how you can implement structured data in your website’s HTML.
How to add structured data to your Shopify store?
There are 3 ways to implement structured data in your website’s HTML:
- Use a Shopify SEO app like Smart SEO - Smart SEO automatically provides Google (and other search engines) with detailed structured data in JSON-LD format. For example, it generates structured data for every product on your collection pages. As a result, the app helps you get rich snippets and rank higher on the SERPs. Smart SEO sports a 4.9/5 rating. It has a free plan and three paid plans. Pricing starts from $9.99/month. Learn more → Smart SEO Pricing
Note that there are a handful of apps on the Shopify App Store that can add structured data to your store. We recommend that you use only one at a time. Otherwise, you may end up with a mess of duplicate structured data which can hurt your rankings.
- Do it manually. For this to happen, you must be familiar with Shopify Liquid, JSON-LD (and JSON for that matter), HTML, and schema.org. If you’re not a skilled developer (or don’t have one in-house), we don’t recommend this option because of the possibility of introducing errors to your website’s HTML. Instead...
- Work with a certified Shopify expert and outsource the task. We offer an SEO service which includes an SEO audit, structured data optimization, meta tags optimization, link optimization, and more. If you're interested in working with us, or want to learn more, do not hesitate to contact us.
Now that you know your options for implementing structured data in your Shopify store’s HTML, let’s take a closer look at the different schema.org data types and properties you need to add to the different pages of your website.
What structured data markup to add to your Shopify homepage?
You should add 2 data types to your homepage:
Schema.org defines ‘WebSite’ as a set of related web pages that usually share the same domain. You have to include the following properties in the WebSite data type:
- url - your website’s URL
- target - “Indicates a target EntryPoint for an Action” (source: schema.org)
- query-input - this is a text search deep link with -input that inlines “the resulting value of -input properties into action URLs” (source: schema.org)
Here’s BeachCandy Swimwear’s review of our app:
For example, Store, SportsOrganization, Corporation, LocalBusiness, BikeShop, BookStore, WorkersUnion, HardwareStore, etc. Note that the more specific the Organization type is, the better. You have to include the following properties in the Organization data type:
- name - your Shopify store or website's name
- url - your website's URL
- description - a description of your business (who you are, what you sell, how your product/service benefits customers, etc.)
- logo - Google displays your logo in search results and in the Knowledge Graph (read full definition)
- sameAs - links to your social media profiles (Facebook business page, Twitter profile, YouTube account, Instagram account, etc.)
- address (PostalAddress) - streetAddress (street and number), addressLocally (city), postalCode, address Country (country)
You can also include a price range (priceRange), contact information (e.g. a phone number), geolocation, and more.
Here's Alexander's review of our app:
What structured data markup to add to your Shopify product pages?
You should add 3 data types to your product pages:
The Product type describes the product itself and the Offer type describes a product variant with its price, sku, barcode, etc. You need to have one Product type and at least one Offer type for each product variant. If you do not have variants for a product, you will have the price, sku, barcode, etc. as properties of that product. These properties are added as a default variant in Shopify and you can use this variant to create your Offer type.
Product data type (required properties):
- name - product name
- image - imageObject or URL of the product photo
- offers - product variants
Product data type (recommended properties):
- aggregateRating - the average review score of the product
- sku - a unique Stock Keeping Unit of the product
- gtin8 / gtin13 / gtin 14 / mpn / isbn - global identifiers, or unique product identifiers
It is important that you have the following recommended attributes: productID, brand, mpn (Manufacturer Part Number, MPN), and gtin (Global Trade Item Number, GTIN). This will help Google match search queries with your products.
In Shopify, the GTIN is referred to as barcode and you can add it to your product variants. The GTIN is also your productID and can also serve as an MPN. Note that Smart SEO outputs the barcode for the productID, gtin and the mpn properties.
Offer data type (required properties):
- availability (e.g. InStock, OutOfStock)
Offer data type (recommended properties):
- priceValidUntil (in ISO 8601 date format)
- url (the URL of the product page)
Here's The Dove Factor's review of our app:
It is a good practice to add breadcrumb markup to your product pages. This will help Google better understand and categorize the information from your product pages. The breadcrumb markup should contain the BreadcrumbList type. The BreadcrumbList type should contain at least one ListItem type. The ListItem type should contain the following properties:
And here’s Spyder Industries’ review of our app:
What structured data markup to add to your Shopify collection pages?
The CollectionPage type should contain the following properties:
- name - the name of the collection page
- url - the URL of the collection page
- description - description of the collection page
- image - the main image of the collection page
Here’s Shop Vanillapup’s review of our app:
The ListItem type should contain the following properties:
- position - the position of the product on the collection page, i.e. if the product is displayed third, the position value would be “3”
- url - the URL of the product page
And here's Victorian Ladies' review of our app:
It is also a good practice to add breadcrumb markup to your collection pages (please, check the Product page markup section for more information on breadcrumb markup).
What structured data markup to add to your Shopify blog page?
You should add only one data type to your blog page - Blog, - and include the following properties in your blog markup:
- about - a description of your blog; the subject of the blog (e.g. e-commerce, Shopify, your product or service, etc.), how can it help readers, etc.
- name - the name of your blog
- url - the URL of your blog
- keywords - the keywords you target
The Blog type should contain a number of BlogPosting types. Each BlogPosting type is associated with an article or a publication. The BlogPosting type should contain the following properties:
- mainEntityOfPage - the canonical URL of the page
- image (ImageObject)
- url - the URL of the page
- description - a description or an excerpt of the blog post
- logo (publisher logo)
- url (publisher URL)
- name (publisher name)
And here's Tiny Tots Baby Store's review of our app:
What structured data markup to add to your Shopify article pages?
Article pages in Shopify should have the Article type. The Article type should contain the following properties:
- about - the subject of the article
- headline - the headline of the article
- image - the cover image of the article
- url - URL of the article
- description - a description or an excerpt of the article
- articleBody - the body of the article
- logo (publisher logo)
- name (publisher name)
Testing your structured data markup
Google recommends starting with the Rich Results Test. In this way, you'll see what Google rich results can be generated for your pages. Next, you can use the Schema Markup Validator to test and validate all types of schema.org markup. Learn more → Test your structured data
Adding structured data markup to your Shopify store will help search engines understand better what your website is about. It will also increase your chances of getting rich results which, in turn, will increase user engagement and your CTR - all leading to more sales.
There are 3 structured data formats: JSON-LD, RDFa, and Microdata. Google prefers and recommends using JSON-LD for structured data.
There are 2 structured data schemas (or vocabularies): data-vocabulary.org and schema.org. Data-vocabulary.org is outdated and is not eligible for rich results features. Thus, if you’re using data-vocabulary.org markup, you must replace it with schema.org markup.
Structured data markup (or schema.org markup) consists of data types and properties arranged in hierarchical order. In Shopify, it is recommended that you add structured data to your homepage, product pages, collection pages, blog page, and article pages. Here is a brief overview of the data types and properties you should add to each of these pages:
There are 3 ways to add structured data to your Shopify store:
- Use a Shopify SEO app like Smart SEO
- Do it manually
- Outsource the task to a Shopify Expert - If you’d like us to take a look at your website’s SEO and implement structured data for you, don’t hesitate to contact us!
We realize that this is a lot of information to take in at once and you must have a lot of questions. We’re here to answer all of them! But we'd also like to hear from you!
How will you add structured data markup to your website? Will you use an app, will you do it in-house, or outsource it to a Shopify Expert?
Or, maybe, you’ve already added structured data and want to share your experience?
Whatever it is, just leave a comment below!