Shopify Structured Data: Why and How to Add It To Your Store

Shopify Structured Data: Why and How to Add It To Your Store

Shopify structured data is a standardized format to present your store information. Search engines use it to better understand and classify a website’s content. Implementing structured data correctly Shopify stores capture rich snippets. Together with that, click-through rates and general website performance might grow.

SERP result screenshot of Walmart scented candle with rich results

Structured data uses schema markup for a vocabulary. Adding schema markup to your website can be a tough task, even more so if you don’t dabble with code all that often.

Adding Shopify schema markup is easier than you think. Install TinyIMG, give us the details about your product and we’ll do all the work for you!

Get TinyIMG now

In this guide, we’ll walk you through structured data basics, its types, how it can improve your Shopify store SEO performance and how to add it in a simple and manageable manner without previous coding experience.

How does structured data work?

Since search engines need to see the same data snippets to universally recognize them, structured data markup is standardized. This means you need to use a predefined vocabulary and structure to implement it.

Let’s also establish that what people see on a webpage does not change. Only the code gets altered to make it easier for search engines to understand the content.

To illustrate this, here are two examples of code snippets from schema.org Product type schema markup section.

This is regular HTML for a product page section that displays product options from various sellers:

Product page code for Dell Ultrasharp LCD monitor in plain HTML

And here you can see that same information organized using structured data markup:

Product page code for Dell Ultrasharp LCD monitor with JSON-LD schema markup

If you take a closer look, you will notice that information is categorized using types, which then have other types and various properties under them, organized in hierarchical order.

To understand how to properly use schema markup for better Shopify store’s performance, let’s examine structured data types and what they mean for Shopify stores a bit more deeply.

Structured data formats

Without getting into too much detail, there are three main structured data formats Google recognizes: JSON-LD, Microdata, and RDFa. All three have their use cases, but JSON-LD is the universally recommended option.

JSON-LD structured data (recommended)

JSON-LD (JavaScript Object Notation for Linked Data) is JavaScript syntax that you include in the <script> element anywhere on your webpage. Simply put, it does not require you to mess with the existing code, it’s easy to update and it can be added to the page dynamically, for instance using CMS widgets.

On top of that, Google itself recommends it out of the three options. Later on, we’re going to demonstrate how to add structured data in JSON-LD format to your Shopify store pages.

Microdata and RDFa

Both Microdata and RDFa get embedded within the HTML code of your webpage, meaning it goes together with the content users see on the page. The implementation requires modifications to the code, so it can be quite complicated to get it right. Plus, Microdata and RDFa are more susceptible to software bugs, human error and can be a pain to maintain if you’re not a seasoned developer.

If you want to get into detail about Microdata and RDFa, there is an awesome Stack Overflow thread that takes both of them apart in terms of specifications, applicability, use of reverse properties, and more. For the purpose of this article, we’ll leave it off here and continue with JSON-LD.

How does structured data benefit Shopify stores?

There is a number of reasons why Shopify stores benefit from having structured data implemented on their website:

  • Capturing rich snippets. Structured data makes your website eligible for rich snippets. It means that not only your page URL, meta title, and meta description show up on the SERPs, but also product rating, pricing, availability, and more. Rich snippets are a proven way to gain more visibility and increase click-through rates.
  • Better rankings on the SERPs. Helping Google understand the content of your page can boost the overall performance of your website on the search result pages.
  • Dominate local search. Using structured data to tell Google about your business hours, contacts, and, most importantly, address, will help you get on local SERPs and be seen by those looking for your type of business in the area.
  • Faster indexing. Crawling and indexing over 50 billion web pages is a tough task. Ensuring that Google can get through yours faster can help you get ahead with indexing.
  • Targeting voice search. Voice search queries tend to be longer and less coherent. Giving Google a very good understanding of your page content can help match your web pages to the expectations of people using voice search.

How to add structured data to a Shopify store?

You have two main options to implement structured data into your Shopify store, install a Shopify app that has structured data functionality or tackle the task manually.

Using a Shopify app to add schema (recommended)

Structured data implementation requires great attention to detail and quite a bit of knowledge of Shopify Liquid, HTML, and more. So why not let an app designed to improve your Shopify store take care of it for you?

Among many SEO and website performance improvement features, TinyIMG Shopify app can help you create and implement JSON-LD schemas for your product, blog, and other Shopify store pages.

TinyIMG structured data implementation dashboard that includes store details, contacts and price ranges

All you need to do is provide relevant information in a dedicated dashboard and TinyIMG will do all of the work for you. Then, you sit back and watch your store rule the SERPs as you start receiving rich snippets and sky-high click-through rates.

JSON-LD implementation comes with all paid TinyIMG plans.

Manual schema implementation

Manually adding structured data markup to your Shopify store is always an option if you’re up for the challenge.

JSON-LD is implemented in your web pages' <script> element using JSON notation. To successfully implement schema markup, you will need to call the script, define its context, type, and properties.

If you were to implement super simple JSON-LD markup for a product page, this would be the final result:

CODE SNIPPET:

 

<script type="application/ld+json">
{

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

"@type": "Product",
"name": "Vanilla Scented Candle, 6x7,5 cm",
"description": "Vanilla scented candle that stimulates happiness and joy. More text that describes your awesome product.",
"image": "candle-dream-vanilla-scented.jpg",
"offers": 
    {
    "@type": "Offer",
      "availability": "InStock",
      "price": "12.00",
      "priceCurrency": "USD"
    }

}
</script>

Now let’s take this step by step:

1. Call the script. The <script> element with JSON-LD attribute basically tells the browser “Hi, you will see JavaScript encoded as JSON-LD”.

CODE SNIPPET: 

 

<script type="application/ld+json">
{
your wonderful structured data
}
</script>

2. Define context. In this step, you need to explicitly state what vocabulary you will use for your data markup. The easiest approach is to reference the entirety of schema.org. That way, you will be able to use all Types and Properties out there.

CODE SNIPPET: 

 

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

 

3. Define type. You need to define the entity type you will be describing with your JSON-LD. In this case, since it will be Product.

CODE SNIPPET: 

 

"@type": "Product",

 

4. Define properties. All properties available for that entity type can be added now. You can find schema.org Product Properties on this page.

CODE SNIPPET: 

 

"name": "Candle "Dream", 6x7,5 cm",
"description": "Vanilla scented candle that stimulates happiness and joy. More text that describes your awesome product.",
"image": "candle-dream-vanilla-scented.jpg",
"offers": 
    {
    "@type": "Offer",
      "availability": "InStock",
      "price": "12.00",
      "priceCurrency": "USD"
    }

A couple of things to note:

  • Pay attention to the curly brackets. You need them right after the <script> element closes for JSON-LD to correctly apply to the page. Also, use curly brackets whenever you’re defining properties of a type within a type, just like you see Offer properties defined in separate curly brackets. Everything before and after that defines the main entity aka Product.
  • Watch out for cases and special characters. Don’t use quotes with schema.org markup. Also, all of it is case-sensitive, so be mindful of that.
  • Add all required properties. Some properties must be defined if your markup is to work correctly. They are different for every data type.
  • This is an example for illustration. If you want to see how a full product page markup in JSON-LD looks, consult Google’s documentation of product markup. It’s pretty detailed and complicated, that’s why we stand by our suggestion to install a Shopify app that will do it for you.

Adding structured data to your Shopify store pages

Let’s take a look at specific Shopify pages and what JSON-LD can do for them.

If you decide to go the manual route, you’ll have to go to Themes -> Actions -> Edit code. From there, you can begin adding structured data to your Shopify pages.

Shopify store Themes section showing how to access Edit Code to insert structured data

We’re not going to get into a lot of detail about every different type of structured data markup you can implement, especially because an app can do all of this for you.

Instead, we will look over what types of structured data each Shopify store page can benefit from and how to correctly think about them.

Schema markup for Shopify product pages

Shopify product pages are the focus of all stores - that’s where the sales happen. Implement the right structured data to make your product pages stand out in the SERPs by featuring product ratings, prices, availability, and other features.

Let’s start with the basics. These three types of data are needed on all Shopify product pages:

  • Product (describes the product).
  • Offer (describes product variants).
  • BreadcrumbList (ensures breadcrumbs are shown correctly on the SERPs).

Product

Your product markup won’t function properly if you don’t define these required properties:

  • Name - the name of your product
  • Offers/Review/aggregateRating - product variants or ratings are required. Once you include one, the rest become recommended.
  • Image - imageObject type or product photo URL

Then there are the recommended properties you can implement for more wholesome coverage:

  • Offers/Review/aggregateRating - whichever two remain after the one you used for required properties.
  • Brand
  • Description
  • Unique product identifiers (gtin8 / gtin13 / gtin 14 / mpn / isbn)
  • sku - a unique Stock Keeping Unit of the product

Offer

To successfully define product variants, these are the required properties:

  • availability
  • price
  • priceCurrency

Recommended properties:

  • itemOffered
  • url (the URL of the product page)
  • priceValidUntil (in ISO 8601 date format)
  • itemCondition
  • Sku

Note that if your product only has one variant, these properties will define the Product type.

Upon implementing product markup into your Shopify store page, you can expect rich snippets on the SERPs. These include displaying aggregate reviews, availability, prices, and many more details.

How it looks:

SERP listing of Women's Nike Air Max with aggregate reviews, price and availability displayed

Schema markup for Shopify collection pages

CollectionPage is the main data type that a collection page should contain. Collection pages should also have at least one ListItem type for each product included in the collection page.

Collection page properties should include:

  • name - collection page name
  • url - collection page URL
  • description - collection page description
  • image - the main image of the collection page

ListItem should define:

  • url - product page URL
  • position - the position in which the product is shown on the collection page

Schema markup for Shopify store homepage

To help search rankings get a better overall understanding of your business, your homepage should contain two types of Shopify structured data markup:

  • WebSite
  • Organization

WebSite

Properties needed for WebSite type:

  • url - website URL
  • target
  • query-input

Organization

Properties needed for Organization type:

  • name - your Shopify store name
  • url - website URL
  • description - a description of your business
  • logo

Schema markup for Shopify blog pages

If you’ve been putting your time into a well-researched and informative Shopify blog, you want to make sure Google sees the effort too.

Adding structured data to Shopify blog pages requires only one type of markup, Blog.

Required properties for Blog structured data type:

  • about - a description of your blog
  • name - blog’s name
  • url - the URL of your blog
  • keywords - the main keywords you target

The Blog type should contain a number of BlogPosting types that relate to specific articles.

The following properties are needed for BlogPosting type:

  • headline
  • mainEntityOfPage - the canonical URL of the page
  • image (ImageObject)
  • url - the URL of the page
  • dateCreated
  • datePublished
  • dateModified
  • description - a description or an excerpt of the blog post
  • author
  • publisher
  • logo (publisher logo)
  • url (publisher URL)
  • name (publisher name)

How to test your structured data markup?

The easiest way to test whether structured data markup was successfully implemented on your page is to use Google’s Rich Results Test.

Insert the web page you’re interested in and this test will provide you with:

  • Structured data types present on this page
  • Warnings or invalid items
  • Suggestions for your structured data

If you’re looking for tools to test more specific aspects of structured data, here are our top picks:

Structured data for Shopify stores: final thoughts

Rich snippets are a quick win for better SERP performance and improved click-through rates. Understanding how to use structured data and capture rich snippets is a solid step towards a more optimized and better-performing Shopify store.

This guide gave you a good look at how structured data works, how to implement it, and in general how to master structured data for Shopify stores. Now you only need to make it happen!

Install TinyIMG and let the app do all the work for you! With TinyIMG, you can create and add JSON-LD to your Shopify store in under 10 minutes!

Add structured data

Curious to read more? Check out these articles:

 

About the author
Vita Klimaite
Vita believes that every great product must be supported by an even better marketing strategy. Armed with SEO and Content Marketing experience, Vita is dedicated to helping website and eCommerce store owners unlock the power of search engines and scale their businesses. A big fan of remote work, she is always on the road, so you can also hear some exciting travel stories from her.