How to add schema markup to Shopify
Check the product schema your Shopify theme already outputs, fill the gaps Google needs for merchant listings, and test it before and after you publish.
What this is for
Schema markup is structured data: a block of code, usually JSON-LD, that labels what a page contains so search engines do not have to guess. On a product page it can let Google show the price, stock and rating in the result itself. source, checked 28 September 2026
Most Shopify stores already have some. Shopify says its current themes include product structured data out of the box, so the work is usually checking it, filling gaps and removing conflicts, not starting from nothing. By the end you will know what your pages output, what Google requires, and how to test a change before and after it goes live. source, checked 28 September 2026
Time needed and what you need
Time needed: about 2 hours. Testing five pages takes half an hour; adding missing fields in the theme and retesting takes the rest, longer if a developer does the code.
- Staff access to Online Store and the theme code editor in your Shopify admin
- A duplicate of your live theme to make changes in
- Five test URLs: two products with variants, one without, one blog post and the home page
- Search Console access for the URL Inspection tool
The steps
Test before you add anything. Plenty of stores install a schema app on top of markup the theme already prints and end up describing every product twice.
1. Test what your pages output today
Paste each of your five URLs into Google's Rich Results Test. It lists every structured data item it finds, with errors and warnings, and it is the checker Google itself points to. source, checked 28 September 2026
For each URL, note which types appear: Product or ProductGroup, Offer, AggregateRating, BreadcrumbList, Organization, Article. Circle any type that appears twice on the same page.
2. Trace where each block comes from
Open the theme code editor and search the product section for structured_data. That Liquid filter turns a Shopify product or article into schema.org JSON-LD, so finding it tells you the theme is the source. source, checked 28 September 2026
Anything the theme does not print usually comes from an app, most often a reviews app adding ratings. Knowing the source tells you where each fix has to happen: theme code or app settings.
3. Use merchant listing markup on product pages
Google has two kinds of product markup. Every Shopify product page is a page where people buy from you, which puts it under merchant listings; product snippets are for review pages that do not sell. source, checked 28 September 2026
Merchant listings need name, image and offers on the Product, and the offer has to be a single Offer from you as the seller. source, checked 28 September 2026
Inside that offer Google needs a price and a currency, and the price has to be above zero, so free samples will not qualify. source, checked 28 September 2026
4. Check products with variants
Shopify's structured_data filter describes a product with variants as a group rather than a single product. In the test results, open the group and check that each variant carries its own price and availability. source, checked 28 September 2026
5. Fill the gaps in a duplicate theme
Duplicate your live theme and edit the copy. If the product section prints no JSON-LD at all, add the structured_data filter for the product inside a script tag of type application/ld+json. If it prints JSON-LD but leaves out something you hold, such as brand or GTIN, have a developer add those fields.
Write anything new as JSON-LD rather than microdata. Google recommends it because it is the easiest format to keep correct. source, checked 28 September 2026
6. Mark up only what shoppers can see
Every value in the markup must match the visible page: the same price, the same stock status, the same number of reviews. source, checked 28 September 2026
Ratings have to come from real customers and appear on the page. Google names fake reviews as content not to mark up. If you have few reviews, ask for reviews by email before you add a rating. source, checked 28 September 2026
7. Remove the second product block
If the test shows two Product items for one product, one from the theme and one from an app, keep the more complete one and switch the other off in the app's settings or the theme code. Two blocks with different prices or ratings leave Google choosing between them.
8. Test the change, publish, then inspect live pages
Test the edited theme's preview in the Rich Results Test, pasting the page source if the tool cannot reach the preview, and fix every critical error. Publish, then follow Google's merchant listing checklist: inspect a few live pages in URL Inspection and ask for a recrawl. source, checked 28 September 2026
9. Watch the rich result reports
Once Google recrawls, Search Console shows a report for each rich result type it found. Look at them monthly, because markup can break later when a theme or an app updates. If you have no property yet, set up Google Search Console first. source, checked 28 September 2026
Valid markup makes a page eligible; it does not promise the richer result. source, checked 28 September 2026
A worked example
For a ceramics shop with 80 products, 30 of them with colour variants
Worked example (an invented shop, with invented numbers)
The shop tests 5 URLs. Every product page shows 2 Product items: one from the theme and one from its reviews app, and the app's copy has a rating but no offer.
The shop switches off the app's product markup and asks its developer to add the rating shown on each page to the theme's block. Each page now carries 1 Product item with name, image, offers and aggregateRating, and the 30 products with variants show as groups.
One free sample is priced at 0, which merchant listings do not accept, so the shop accepts that page will not qualify. After the change, 79 of the 80 product pages pass the test with no critical errors.
Common mistakes
Installing a schema app without checking what the theme already prints. You get two Product blocks per page that disagree on price or rating.
Marking up reviews that are not on the page, or ratings imported from another site. The markup has to describe the page as it is. source, checked 28 September 2026
Leaving out required fields and hoping for a rich result anyway. Items without them are simply not eligible. source, checked 28 September 2026
Editing the live theme's code. One stray comma breaks the whole JSON-LD block on every product page. Edit a duplicate, test it, then publish.
Questions people ask
Does schema markup improve rankings?
Google treats it as a route to richer results, not a ranking boost. Even a manual action for bad markup only takes away rich result eligibility and leaves ranking alone. source, checked 28 September 2026
Should I send products to Google Merchant Center as well?
If you can. Google says markup on the page plus a Merchant Center feed gives the widest eligibility and helps it check your data. source, checked 28 September 2026
Which product photos should the markup point to?
Several high-resolution photos of the product itself, ideally in 16x9, 4x3 and 1x1 shapes, each at least 50K pixels when you multiply width by height. source, checked 28 September 2026
See this on your own store
Paste your store URL. The first pass takes about a minute and needs no account. Save a card (nothing is charged) and Tilly reads the whole store and works out who buys from you.