A Shopify store owner wants to manually implement JSON-LD breadcrumb schema for products after experiencing issues with the Smart SEO app, which requires URL modifications to display breadcrumbs.
Solution provided:
Add the schema to the <head> section of product pages via theme code editing
Access through: Online Store > Themes > Edit code, then modify /sections/main-product.liquid or /templates/product.liquid
Use Liquid templating with conditional logic ({% if template contains 'product' %})
Key clarifications:
Only one dynamic schema is needed—Shopify’s Liquid automatically populates product-specific data for each page
Google identifies which product the schema applies to based on the page URL and context
No need to paste separate schemas for individual products
Specific use case:
The user wants all products to show the same collection (“Matcha Collection”) in breadcrumbs. A hardcoded solution was provided showing: Home > Matcha Collection > Product Name.
The discussion includes code snippets demonstrating the implementation. Future automation using metafields was mentioned as a possibility. A Google developer guide link was shared as additional reference material.
Summarized with AI on October 29.
AI used: claude-sonnet-4-5-20250929.
I want to paste in my JSON-LD product breadcrumb schema to show Google what collection the product primeraly belongs to. I have been using the Smart SEO app but there are some issues in that they wont show the breadcrumbs unless i amend the product URL so I want to do it myself and stop using thre app.
Where does the product JSON-LD breadcrumb schema get pasted and how does google know what product it is for?
You’re on the right track wanting to take control of your SEO schema—especially if the app you’re using isn’t giving you the control or output you want. Let’s break it all down for you.
Where to Paste the JSON-LD Breadcrumb Schema in Shopify:
You should add it to the section of your product page, usually via:
Edit your product template file:
In Online Store > Themes > Edit code, go to:
/sections/main-product.liquid or /templates/product.liquid
Look for the tag or insert it right before the using:
{% if template contains 'product' %}
{% endif %}
If you want help writing a dynamic snippet based on a metafield for "primary collection’? Please Reach out thanks!
So for each of the breadcrumbs for each of the products so I just keep pasting in new schema? Does Google know what schema is for what product using the URL?
You only need to add one dynamic JSON-LD schema in your theme. Shopify uses Liquid to fill in the correct product and collection info for each page. Google knows which product it applies to based on the URL in the schema and the page it’s on. No need to paste separate schema for every product.
For the place of pasting JSON-LD breadcrumb schema, you can check this guideline from Google below for reference, which explains how it works very clearly, thank you~