Adding Google Rich Snippets to your Shopify product pages can enhance your search engine visibility, making your products more attractive to potential customers. Follow this detailed guide to implement Rich Snippets on your product page.
You will need to have some technical experience to add this code.
Example result:
👉 Step 1. Access Your Shopify Admin Panel
👉 Step 2. Edit Your Theme Code
In the Shopify admin panel, go to Online Store > Themes.
In your current theme, click "..." > Edit Code.
👉 Step 3. Add JSON-LD Schema Markup
In the Sections folder, open the main-product.liquid file.
Locate the
<script type="application/ld+json">
tag.Find this line of code in the above tag.
"name": {{ product.title | json }},
Add this code below it.
{% assign ryviu = product.metafields.ryviu %} {% if ryviu %} {%- assign aggregateRating = ryviu.product_reviews_info | split: ";" -%} {%- assign r_avg = aggregateRating[1] | plus: 0 -%} {%- assign r_count = aggregateRating[0] | plus: 0 -%} {%- if r_count > 0 -%} "aggregateRating": { "@type": "AggregateRating", "ratingValue": "{{ r_avg }}", "reviewCount": "{{ r_count }}" }, {%- endif -%} {% endif %}
Like in this image.
Save your file.
👉 Step 4. Verify Rich Snippets Implementation
Go to the Rich Results Test.
Enter the URL of your product page to check if the Rich Snippets are correctly implemented.
Watch the full tutorial video for more details
Need help?
Get in touch with our support team through live chat or email at [email protected]. We're here to help!