Shopify Schema Markup: Implementation Guide
Adding schema markup to Shopify is one of the highest-ROI structured-data tasks in ecommerce SEO. Done right, your products become eligible for price, availability and rating rich results. This is a practical Shopify schema markup implementation guide using JSON-LD structured data.
What schema do Shopify stores need?
- Product on product pages — generate it here.
- BreadcrumbList on collection and product pages — generator.
- Organization on the homepage — generator.
- FAQPage on pages with Q&A — generator.
Where to add it in your theme
Shopify themes use Liquid. To add static markup, edit the relevant template under Online Store → Themes → Edit code. Product markup belongs in sections/main-product.liquid (or a snippet it includes); site-wide markup like Organization can go in layout/theme.liquid.
For dynamic product values, replace the static fields from the generator with Liquid variables, for example:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": {{ product.title | json }},
"image": {{ product.featured_image | image_url: width: 1200 | json }},
"offers": {
"@type": "Offer",
"price": {{ product.price | divided_by: 100.0 | json }},
"priceCurrency": {{ cart.currency.iso_code | json }},
"availability": "https://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}"
}
}
</script>
The | json filter safely escapes values. Use our generator to get the structure right, then swap in Liquid.
A note on Shopify's default markup
Many themes include some Product markup already — but it's often incomplete or duplicated. Run your live product URL's HTML through our schema validator to see what's there and what's missing before adding more, so you don't end up with conflicting blocks.
Validate, then ship
After editing your theme, validate with our checker and Google's Rich Results Test. Re-check after any theme update.
Need this done for you?
WebSensePro builds Shopify & WordPress SEO and schema markup implementations that earn rich results — done right, the first time. If you'd rather hand it off, we'll handle the structured data, technical SEO and the rest.