Google Rich Snippets

  • Updated

Rich Snippets showcase your star ratings in organic search results. This increases traffic and conversions to your product pages. Follow this guide to learn more! 


Key notes

  • This guide is only applicable to Shopify users
  • The code below is a fragment, not a standalone block. It is added inside your product page's existing structured data. 

In This Guide


Before you start

Rich snippets read your review data from Shopify metafields, so a few things need to be in place first. If any are missing, the markup will render empty, and no stars will appear. 

  • The Stamped main review widget is installed on your product pages, and Stamped is collecting reviews for that store.
  • The product you are testing has at least one published review. Star ratings can only be generated from real review data, so a product with zero reviews will correctly produce no aggregateRating. This is the single most common reason a merchant thinks the install failed. Always test on a product you know has reviews.
  • Shopify metafield syncing is enabled for your store, so product.metafields.stamped.reviews_count and reviews_average are populated. If you are unsure, contact support@stamped.io, and we can confirm and trigger a sync.
  • You are not already emitting review markup from another app. If you use an SEO app such as JSON-LD for SEO, it may already be publishing your Stamped ratings. Adding this code as well creates two competing product entities. Check your product page source for an existing aggregateRating before installing.

Stamped Main Review Widget For Shopify Users

RichSnip.png

If you're using Stamped main review widget, the rich snippet codes will have to be manually installed. Here are the JSON-LD codes:

{% if product.metafields.stamped.reviews_count and product.metafields.stamped.reviews_count != "0" %} 
,"aggregateRating": {
 "@type": "AggregateRating",
 "ratingValue": {{ product.metafields.stamped.reviews_average | round:2 }},
 "reviewCount": {{product.metafields.stamped.reviews_count}}
}
{% endif %}
		
 

Note the leading comma. It joins this block to the fields above it in your existing structured data.


Installing the code

This snippet does not stand on its own. It is inserted inside the existing product JSON-LD object on your product template, typically after the closing brace of the offers block and before the object's final }, so that aggregateRating becomes another property of the same product.

If you are not comfortable editing theme code, or your product template does not already contain a JSON-LD product block, reach out to support@stamped.io for assistance.


Validating your rich snippets

  1. Open Google's Rich Results Test.
  2. Enter the URL of a product that has at least one review. Testing a product with no reviews will show no rating and is not a failure.
  3. Confirm the Product result lists a Review snippet with your rating value and review count, and that there are no errors.

What to expect: valid markup means your page is eligible for star ratings, not that they appear immediately. Google will re-crawl the page before independently deciding whether to display stars, which usually takes a few days to a few weeks. 

Was this article helpful?

3 out of 6 found this helpful

Have more questions? Submit a request