SEO, AdWords, affiliates, advertising, and promotions
Hello, all I am working on a website (https://perfumeplusoutlet.com/). I have questions related to Website Collection SEO. I am looking to add a custom Schema for the product, to improve the visibility but found no such option. I am using SEO Manager to make SEO-related changes. I have implemented the Local business structured data. But need to add Product schema for all the products. I have approximately 1400 products in my what will be efficient way to add product schema. Also please recommend what features to consider when creating product schema or anyone please provide scheme they have implemented on the store.
Hi @shahzaibahsan3,
I think the easiest way to add product schema is to add a piece of code:
1. In your Shopify admin, click Edit code. Then, create a new file under Snippets (Add a new snippet). Then, insert the following piece of code. Name it as product-schema.liquid and save it,
<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>
2. Go to your main product file (something like product-template.liquid, product-main.liquid...) and paste at the end of the file this: {% include ‘product-schema’ %}
3. I would also double check with Google what are the compulsory fields – their documentation isn't updated!!! Plus, I would also test the products' URLs with this tool: https://validator.schema.org. It will tell you if there are any errors or fields missing.
Hope this helps!
Hi @Niki_K appreciate your insights. Can you however add ratings and reviews schema in the code above? It seems to be missing them.
Hey @marketingwiz,
you will probably need to add something like this:
"review": {
"@type": "Review",
"reviewRating": {
"@type": "Rating",
"ratingValue": "{{ product.rating }}",
"bestRating": 5
},
"author": {
"@type": "Person",
"name": "{{ product.author }}"
},
"reviewBody": "{{ product.review }}"
Hello,
Below I have mentioned some steps, it will help to add schema for all your products.
1. Login to your Shopify Store.
2 . Scroll down and go to themes > edit your theme
3. Go to snippets folder and add a new snippet and name it “product-schema.liquid”
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]
5. Go to the product.liquid file, scroll down to the end of the page and paste this code.
Also, you can install the below chrome extension to check your website pages schema optimization.
https://chrome.google.com/webstore/detail/schema-builder-tester-for/klohjdodjjeocpbpadmkcndjoadijgjg
Below, I have shared the screenshot for one of the product’s from your website, you can use the schema builder tool (download from the above link), it will help to check for the schema tag optimization.
Pro Tip - You can also test your product URLs with this tool - https://validator.schema.org/. It will tell you if there are any missing fields (including errors).
>>Points to consider when creating a product schema -
If you are willing to add schema through Shopify App, here is the link - https://apps.shopify.com/schema-plus
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024