How to add Google Product Schema to Shopify Product Page?
It is easier than you think to add Google Product Schema on a Shopify product page, just follow below 3 steps:
1- Copy below code:
[code]
<script type=’application/ld+json’>
{
“@context”: “http://schema.org/”,
“@type”: “Product”,
“name”: “{{ product.title }}”,
“url”: “{{ shop.url }}{{ product.url }}”,
“image”: “{{ shop.url }}{{ product.featured_image }}”,
“description”: “{{ page_description }}”,
“offers”: {
“@type”: “Offer”,
“priceCurrency”: “{{ shop.currency }}”,
“price”: “{{ product.price | money_without_currency }}”,
“itemCondition”: “http://schema.org/NewCondition”,
“availability”: “http://schema.org/InStock”
}
}
</script>
[/code]
2- Go to online store -> themes -> Edit your theme
3- Go to the snippets folder under your theme code and create a new snippet call it "product-schema"
4- Paste the code you copied in step 1 into the new "product-schema.liquid"
5- Go to Product.liquid file, scroll to the very end of the page and past this code: {% include ‘product-schema’ %}