Shopify Structured Data: What Your Theme Misses and How to Fix It

Skip to content

Sign up to get $100 off your next service

Most Shopify themes already output basic product structured data, but the default covers only the basics. Shipping details, return policies, ratings and store-level context usually have to be added by you, through theme code or an app. This guide shows what your theme generates, what it leaves out, how to add the rest as JSON-LD in Liquid, and how to check that Google reads it.

Zcoder

Make Shopify data work harder

Zcoder helps DTC brands optimize Shopify technology, including app choices and inventory management, to support a smoother online store.

Visit Zcoder

TL;DR

Table of Contents

What structured data does for a Shopify store

Structured data is a standardized way to describe a page to a machine. On a product page, that means name, price, currency, availability, identifiers and images, written in a format such as JSON-LD. Google’s product structured data documentation explains that this information can make your products appear in richer ways in Search, including Google Images and Google Lens.

Two things are worth separating, because merchants often mix them up:

Google is clear that markup does not promise a rich result. What it does is give crawlers, shopping systems and increasingly AI-driven search features a clean version of your facts, so they don’t have to guess from page text. For a store with hundreds or thousands of SKUs, that consistency is the point.

What Shopify generates by default

Most current themes, including Dawn, call the structured_data filter on the product object. Shopify’s own ecommerce schema guide says the output covers the basics, while breadcrumbs, FAQs and return policies typically need to be added manually or through an app. The filter documentation states it works on the product and article objects.

In practice, a default Shopify product page gives you:

And it usually does not give you:

That gap is where most stores lose eligibility for the fuller merchant experiences.

Audit before you add anything

Adding markup on top of markup is the fastest way to create a mess. Developers who audit themes regularly report structured data that was missing, half broken, or injected by several apps at once. Before you write a line of code:

  1. Open a product page, view source and search for application/ld+json. Count the blocks. More than one Product block is a warning sign.
  2. Check where each block comes from. The theme’s main product section, a review app, an SEO app and a page builder can each output their own.
  3. Run the page through Google’s Rich Results Test and note errors versus warnings. Errors block eligibility; warnings flag optional fields.
  4. Compare the markup against the visible page. Price, availability and variant data in the schema must match what the shopper sees.
  5. Decide on a single owner for each type. Theme for Product, one app or one snippet for reviews, one snippet for Organization.

Shipping and return policy: the merchant listing gap

Google’s research-backed distinction matters most here. Product snippets can work with the basics. Merchant listings ask for more comprehensive information, specifically shippingDetails and MerchantReturnPolicy, and the default Liquid output doesn’t generate them. You add them through custom code or a schema app.

There are two ways to supply them:

If your policy has quirks, such as different windows for final-sale items, use the per-offer route for those items and the Organization default for the rest. Whatever you mark up must match the policy pages shoppers can read. If you ship internationally, rates and markets also need to be set up properly in Shopify first; our write-up on international shipping failures when markets lack rates covers that side.

Adding JSON-LD in Liquid the safe way

If you’re comfortable editing a theme, a snippet file such as snippets/schema-extra.liquid rendered from the product section keeps things tidy. Two details trip up almost everyone.

Escape strings with the json filter

Product titles and descriptions contain quotes, ampersands and line breaks. Shopify’s json filter converts a string or object into JSON format and includes the surrounding quotes itself, so don’t wrap its output in quotes again. Use {{ product.title | json }}, not "{{ product.title }}".

Convert prices to decimals

Shopify stores money as integers in the smallest currency unit. Google’s parsers want a numeric value, not a formatted string like “$24.99”. The developer guide above uses divided_by: 100.0 to convert a price, so 2499 becomes 24.99. Keep the currency in a separate priceCurrency field using cart.currency.iso_code. Remember this assumes a two-decimal currency, so check zero-decimal currencies if you sell in them.

A minimal pattern

The structure below shows the idea for a return policy and shipping block inside an offer. Fill the values with your real policy:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "@id": {{ product.url | prepend: shop.url | append: '#product' | json }},
  "name": {{ product.title | json }},
  "offers": {
    "@type": "Offer",
    "price": {{ product.selected_or_first_available_variant.price | divided_by: 100.0 | json }},
    "priceCurrency": {{ cart.currency.iso_code | json }}
  }
}
</script>

In a real build you would not output a second Product block next to the theme’s. You would either extend the theme’s output or replace it, and add shippingDetails and hasMerchantReturnPolicy inside the offer. That is the part that needs care, which is why many stores hand it to a developer.

Ratings and reviews without risking a penalty

Reviews are the most requested rich result and the most commonly broken one. There are two separate problems.

Missing data. The theme’s structured_data filter doesn’t currently produce the aggregate rating, and standard metafields like reviews.rating aren’t always pulled in. If you add AggregateRating yourself, give it the same @id as the parent product, or in the case of variants the parent ProductGroup. Google’s variant documentation explains how ProductGroup and Product relate. Mismatched IDs fragment your schema and weaken the link between rating and product.

Self-serving reviews. Google’s review snippet guidelines are strict about using markup to inflate your own rating or review count. Markup should reflect real reviews that shoppers can see on the page, preferably collected through a platform that verifies them. Never hard-code a rating to look better. The downside, a manual action or reduced visibility, is far larger than the upside.

Variants, organization and the rest of the store

Apparel, shoes, furniture and similar products come in sizes and colors. Google’s guidance for these uses ProductGroup with individual Product variants, so the page is understood as one product family rather than a pile of near-duplicates. If your theme only describes the selected variant, you may be underdescribing the page.

Beyond products, consider:

Don’t add markup for content that isn’t on the page. It’s the quickest route to warnings, and it adds no value.

Testing and monitoring

Structured data breaks quietly. A theme update, a new app or a changed metafield can alter output with no visible change on the storefront.

If you also track performance through analytics, make sure structured data changes are annotated alongside your tracking setup. Our guide to Shopify analytics setup with GA4, pixels and accurate data shows how to keep that clean.

Our perspective

We see the same pattern across DTC stores: the theme ships working product schema, an SEO app adds a second block, a review app adds a third, and nobody owns the result. The store looks fine, the Rich Results Test shows green for some blocks, and merchant listing fields are still missing.

Our view is that structured data is an operations problem as much as an SEO one. The facts in your markup, price, stock, shipping, returns, come from systems that change daily. If your inventory or ERP data is unreliable, your schema will be too. That is why we look at the data source first, then the markup, and why we favor one clear owner per schema type over stacking apps.

We also tell merchants to keep expectations honest. Markup makes your catalog eligible and legible. It does not replace fast pages, clear product content or real reviews. Fix those too, and the schema work pays off more reliably.

— Jason

Getting structured data done for you

If you’d rather not edit theme code yourself, our Shopify SEO Services engagement is a fixed fee of 999 USD one-off. Structured data is a natural part of that technical SEO work, and you know the cost up front. If your store is also slow, our Shopify Speed Optimization service is 1999 USD one-off, and extra schema blocks from stacked apps are one of the things worth checking. Stores worried about compliance can look at our accessibility and data privacy service, also 999 USD one-off. You can see everything else on our ecommerce technology page.

Common mistakes to avoid

FAQ

Does Shopify add structured data automatically?

Yes, for products and articles, through the structured_data filter in most modern themes. The output covers the basics such as name, price and availability. Fields like shipping details, return policies, ratings and breadcrumbs usually need custom code or an app.

Is JSON-LD the right format for Shopify?

JSON-LD is the format Shopify’s filter outputs and the one Google’s documentation uses in its examples. It sits in a script block, separate from your visible HTML, which makes it easier to maintain than inline attributes. Use it unless you have a strong reason not to.

Will structured data guarantee rich results?

No. Google treats markup as eligibility, not a promise. Correct, complete markup that matches the visible page gives you the best chance, but display decisions stay with the search engine.

Should I use an app or edit the theme?

Both work. An app is faster to start with and suits stores that don’t have developer time. Theme code gives more control and avoids another subscription. Whichever you choose, make sure only one source outputs each schema type.

Sources