Guide · 7 minute read

Structured data for Shopify products, in plain English.

Structured data is a small block of code that tells machines exactly what a page is about: this is a product, it costs $64, it's in stock, it's made of linen. Here's what to include and how to check it.

Linen camp shirt JSON-LD
"@type": "Product"
"name": "Linen camp shirt"
"brand": "Field & Fold"
"additionalProperty": [
{ "name": "Material", "value": "100% linen" }
{ "name": "Fit", "value": "Runs large" }
]
"offers": { "price": 64, "availability": "InStock" }
Readable by Google and AI shopping assistants

What it is

Most stores use JSON-LD: a <script type="application/ld+json"> tag in the page that describes the product using the shared schema.org vocabulary. Shoppers never see it. Google uses it for rich results, and AI shopping assistants can read facts from it without guessing.

The fields that matter

FieldWhat to put in it
nameThe product title
descriptionPlain text, no HTML
imageFull-size product photos
brandYour brand or the maker
sku and gtinYour SKU, and the barcode if it has one
offersOne per variant: price, currency, availability, URL
additionalPropertyFacts like material, fit and capacity
aggregateRatingOnly if you show real reviews on the page

Everything in your structured data must match what's visible on the page. A price or stock status that disagrees with the page is a common reason for warnings.

Adding it to Shopify

Many themes already print basic Product markup. Check yours first (see below). To add facts and complete offers, you can edit your theme's product template, or turn on the StoreAi structured data app embed, which adds a complete Product block using the same @id as your page so search engines merge it with the theme's markup:

Facts as additionalProperty (from the StoreAi app embed)
{%- assign facts = product.metafields.storeai.facts.value -%}
{%- if facts and facts.size > 0 -%}
"additionalProperty": [
  {%- for fact in facts -%}
    { "@type": "PropertyValue", "name": {{ fact.name | json }}, "value": {{ fact.value | json }} }
    {%- unless forloop.last -%},{%- endunless -%}
  {%- endfor -%}
],
{%- endif -%}

Checking it

  1. 01Rich Results TestPaste a product URL into Google's Rich Results Test. It shows the Product it found and any errors.
  2. 02Search ConsoleThe Merchant listings and Product snippets reports show problems across your whole store.
  3. 03Spot-check the sourceView page source and search for ld+json to see exactly what's printed.

Questions

Will structured data improve my rankings?
It isn't a ranking boost on its own. It makes your product eligible for richer results and easier for machines to understand correctly.
Do I need a developer?
Not with an app embed. Editing theme code directly is safer with a developer or a duplicate theme to test on.

Try it on your own store. Free.

Install free on ShopifyFree plan · No card · Billed by Shopify