Shopify how-to

How to Add Schema Markup to Shopify (Without Breaking Your Theme)

Schema is what puts stars, prices, and answers into Google. How to add Product and Review structured data to Shopify cleanly, and the mistakes that quietly void it.

Updated 2026-06-017 min

What is schema markup, and what does Shopify already have?

Schema markup is structured data, a block of JSON-LD that labels what a page is so search engines and answer engines can read it without guessing. On a product page it says: this is a Product, here is its price, here is its rating, here are the reviews. Google uses it to draw the star rating, price, and availability under your result.

Shopify themes ship with some structured data already, usually a basic Product block, but they rarely include Review or aggregateRating, because the theme has no reviews of its own to describe. That is the gap you are filling: connecting your review data to the Product markup so the stars can appear.

What schema do product reviews actually need?

For rich results, Google needs a Product that contains Review, aggregateRating, or both. The Product block carries name, image, and offers. The aggregateRating carries the average score and the review count. Each Review carries an author, a rating, and the review body.

The rule that catches most people: the reviews and rating in your markup must be visible on the page. You cannot mark up an aggregateRating of 4.8 from 200 reviews if the page shows no reviews. Google treats that as misleading and drops the rich result for the whole page.

  • Product: name, image, and offers (price, currency, availability).
  • aggregateRating: ratingValue and reviewCount, matching what the page shows.
  • Review: author, reviewRating, and reviewBody, for individual reviews on the page.

Should I edit the theme JSON-LD, use an app, or use a generator?

There are three honest routes, and they trade off control against safety. Editing the theme JSON-LD by hand gives you full control but means touching Liquid, where one stray comma breaks the block silently. Letting a review app inject the schema is the least work, but you inherit whatever shape the app emits, and some apps inject it client-side where crawlers may miss it. A schema generator sits in the middle: you paste your real values, it returns valid JSON-LD, and you drop one clean block into the page.

If you are not comfortable in theme code, start with the generator route. It is the lowest-risk way to get a correct block onto the page, and you can paste the output straight into a custom Liquid section without rewriting the theme.

  • Theme JSON-LD: most control, highest risk of a silent syntax break.
  • App-injected: least effort, but check it renders in the page source, not only in the browser.
  • Generator tool: paste real values, get validated JSON-LD, drop in one block.

How do I add the markup without breaking the theme?

Never paste schema into the middle of an existing JSON-LD block. Add it as its own self-contained script. In the theme editor, add a Custom Liquid section (or edit the product template) and place a single new script of type application/ld+json containing your Product block. Keeping it separate means a mistake in your block cannot corrupt the theme block, and vice versa.

Before you save, duplicate the theme so you have a clean rollback. Then add the block, save, and view the live product page source to confirm the JSON-LD is present in the raw HTML, not only after scripts run. If your reviews are injected by an app after load, the safest pattern is to have the app render server-side, or to bind the generator output to values that are already printed on the page.

How do I validate it, and what does failure look like?

Run every product template through two checks: Google’s Rich Results Test for eligibility, and the Schema.org validator for syntax. The Rich Results Test tells you whether the Product is eligible for stars and flags missing required fields. The Schema.org validator catches malformed JSON that the rich results test will sometimes pass over.

The failure you will see most often is not a syntax error. It is a warning that the rating has no visible reviews, or that the marked-up values do not match the page. That is the mismatch rule again. Fix it by making the markup describe exactly what a shopper can see, then revalidate before moving on.

  • Rich Results Test: confirms Product eligibility and lists missing fields.
  • Schema.org validator: catches malformed JSON the rich test may miss.
  • View source on the live page: confirm the block is in the raw HTML.

What are the mistakes that quietly void schema?

Most voided schema is technically valid and still rejected, because it describes something the page does not show. The classic cases: an aggregateRating with no reviews rendered on the page, a review count in the markup that does not match the count on screen, or self-serving review markup on a page that is really a category or homepage rather than a single product.

The deeper version of this problem is readability. Many review apps were built for the on-page shopper and stop there: the stars look right in the browser, but the review text and rating are locked inside a widget that crawlers and answer engines cannot read, so the markup describes content the machine never sees. Getting your existing reviews readable, corroborated, and citable in search and AI is the gap BetterReviews is built to close.

  • aggregateRating present, but no reviews actually rendered on the page.
  • Review count or average in markup not matching the visible numbers.
  • Product or Review markup on a page that is not a single product.
  • Reviews trapped in a client-side widget the crawler cannot read.

What this adds up to

Clean Shopify schema is three things: a self-contained Product block, real reviews visible on the page, and markup whose every value matches what a shopper sees. Add it as its own script so it cannot break the theme, generate it from your real numbers rather than hand-typing, and validate every template before you call it done.

Do that and the stars, price, and review count become eligible for your Google result. Skip the match rule and the markup is valid and ignored, which is the worst of both: work done, nothing shown.

Product + Review
The schema types Google needs to show review stars on a product result
Google Search Central, 2025
Must be visible
Marked-up reviews have to appear on the page, or the rich result is dropped
Google Search Central, 2025
#1 rejection
A mismatch between markup and visible content is the most common reason schema is voided
AEO research synthesis, 2025
Common questions
Does Shopify add review schema automatically?
No. Shopify themes ship a basic Product block, but Review and aggregateRating are not included by default, because the theme has no reviews of its own. You add those by connecting your review data, either through a review app, a custom JSON-LD block, or a schema generator.
Will adding schema break my theme?
Not if you add it as its own self-contained script rather than editing an existing JSON-LD block. Duplicate the theme first for a clean rollback, place a new application/ld+json script in a Custom Liquid section, and one mistake in your block cannot corrupt the theme block.
Why are my review stars not showing in Google even with valid schema?
Usually because the markup does not match the visible page. Valid JSON-LD with an aggregateRating but no reviews rendered on the page, or a count that does not match what is on screen, gets dropped. Make the markup describe exactly what a shopper can see, then revalidate.
Can a review app handle all of this for me?
Partly. Most apps can inject Product and Review markup, but check that it renders in the raw page source, not only in the browser, and that the values match what shows on the page. Apps that inject schema client-side can leave crawlers seeing an empty container.