Structured data tells Google what a product page is selling: the name, price, currency, stock status and, for products with variants, how those variants differ. Get it right and your listings can show price, availability and review stars in search. Most modern Shopify themes output this for you, so the job is usually checking it, not writing it from scratch.
This guide shows what variant schema should contain, how to check what your theme already outputs, and how personalized products and add-on fees fit in.
Product schema template
The simplest valid pattern is one Product with an offer for each variant. Each offer carries the variant's SKU, price, currency and availability:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Cotton T-Shirt",
"image": "https://example.com/tshirt-red.jpg",
"offers": [
{"@type": "Offer", "sku": "CT-S-RED", "price": "25.00", "priceCurrency": "USD", "availability": "https://schema.org/InStock"},
{"@type": "Offer", "sku": "CT-M-RED", "price": "25.00", "priceCurrency": "USD", "availability": "https://schema.org/InStock"}
]
}
Google also supports a more detailed pattern for variants: a ProductGroup with a variesBy property (for example size and color) and a hasVariant list of individual Products, each with its own offer. It describes size and color variants more precisely, and it's what Google's product variant documentation recommends for stores with many combinations.
What each field does
| Field | What it tells Google | Where Shopify gets it |
|---|---|---|
| name | Product title | Product title |
| sku | Your code for this variant | Variant SKU |
| gtin | Global barcode (UPC, EAN) | Variant barcode field |
| price, priceCurrency | What it costs, in which currency | Variant price and store currency |
| availability | In stock or out of stock | Inventory and "continue selling" setting |
| image | Picture for this product or variant | Product or variant image |
The GTIN field only fills in if you've entered barcodes. Our variant barcode guide covers where to get them and how to enter them.
Dawn theme includes this
Recent versions of Dawn and most current Shopify themes output product structured data automatically using Shopify's built-in Liquid support, including variant offers. Older or heavily customized themes may output an incomplete version, or two conflicting versions if an app adds its own.
To check, paste a product URL into Google's Rich Results Test. Look for a valid Product (or Product variants) result, and check that the price and availability match what the page shows. Then test a URL with ?variant= on the end and check that the price changes to that variant's price.
AggregateRating
If a product has reviews, an aggregateRating block lets Google show star ratings in results. Most Shopify reviews apps add this to your product schema automatically. Make sure only one source adds it; two rating blocks with different numbers is a common error in the Rich Results Test. Our notes on reviews and product options cover per-variant reviews.
Personalization surcharges
Cart Transform fees don't appear in schema, because they're added in the cart rather than set on the variant. The schema shows the base price.
That's correct behavior. If a mug is $18 and engraving adds $6 as a separate cart line, the schema should say $18, because that's what the product costs before optional extras. Don't inflate the schema price to include optional add-ons, and don't list each personalization choice as its own offer. Personalization fields like a name or font aren't variants, so they don't belong in variant schema at all. For the bigger picture, see our guide to rich results for variants.
Variant URLs and canonicals
Shopify gives each variant a URL like /products/cotton-t-shirt?variant=123, but the canonical tag points back to the main product URL. Google treats the main URL as the page to index, and the schema on it should describe all variants. Our article on canonical tags for variants explains why this is usually the right setup.
Common mistakes
- Availability written as plain "InStock" instead of the full schema.org URL. Google accepts both in many cases, but the full URL avoids warnings.
- Missing priceCurrency, which makes the price unusable.
- Two Product blocks on one page, one from the theme and one from an app, with different prices.
- Schema price that doesn't match the visible price after a sale ends.
- Adding FAQ or HowTo markup and expecting rich results. Google now shows FAQ rich results only for a small set of authoritative sites and has retired HowTo rich results.
Frequently asked questions
What schema markup do Shopify variants need?
A Product with an offer per variant, each with SKU, price, currency and availability. For many combinations, Google also supports a ProductGroup with variesBy and hasVariant.
Does Dawn theme include variant schema?
Recent versions of Dawn output product structured data automatically, including variant offers. Check your own store in Google's Rich Results Test, since older or customized themes can differ.
How to add AggregateRating?
Most Shopify reviews apps add it to your product schema automatically once a product has reviews. Make sure only one app or theme adds a rating block.
Schema for personalized products?
Use normal Product schema with the base price. Optional personalization fees added in the cart, and choices like name or font, don't belong in the Product schema.
How to test schema?
Use Google's Rich Results Test to see what Google can use, and the Schema.org Validator to check the markup itself.
Does schema affect ranking?
Not directly. It makes your listing eligible for rich results such as price and review stars, which can make it more appealing in search.
Product schema per variant URL?
Put the full schema on the product URL. Variant URLs canonicalize to it, so one complete block describing all variants is enough.
How to add HowTo or FAQ schema?
You can add JSON-LD in your theme code, but Google has retired HowTo rich results and limits FAQ rich results to a small set of authoritative sites. Add an FAQ section for shoppers, and treat the markup as optional.
Related reading
Sources & further reading
Primary sources referenced in this article. We link to official platform documentation and standards bodies rather than secondary summaries so you can verify claims directly.
- Shopify Help Center: Product variants
- Shopify.dev: Product variant limits
- Shopify Help Center: Line item properties (customization)
Try it free on Shopify
PIMW Product Personalizer's permanent Free plan includes live preview, custom options, and Cart Transform pricing.
Install PIMW Product Personalizer