How to improve store's SEO with Growave Reviews and structured data
IN THIS ARTICLE:
Google helps users find your website by displaying a small part of the content called a "snippet". Rich snippets highlight structured data embedded in web pages, providing additional information beyond standard search results. Reviews are one type of data displayed as rich snippets.
Below is an example of how a search result may appear with a review rating as a rich snippet:
Having star ratings appear next to your online store in Google search results is highly beneficial. Star reviews make your store more eye-catching and help you stand out from competitors on the Search Engine Results Page (SERP). They also build social proof, giving potential customers confidence in your products based on feedback from others.
Additionally, star ratings have been shown to improve click-through rates (CTR), increase organic traffic to your site, and ultimately drive more sales.
Steps to integrate rich snippet into product page
There is a standard Schema.org markup for product pages, which is typically managed by the shop theme provider. To this markup, users can manually add a product rating snippet so that it appears in search results.
Create snippet file
Create ssw-widget-avg-rate-rich.liquid file in the snippets section of the Shopify code editor with the following content:
{% comment %} /************************************************** * DO NOT MODIFY THIS FILE!!! * * IT WILL BE OVERWRITTEN BY UPDATES FROM GROWAVE! * **************************************************/ {% endcomment %} {% if product %} {% assign ssw_review_enabled = 1 %} {% if shop.metafields.ssw['review_enabled'] %} {% assign ssw_review_enabled = shop.metafields.ssw['review_enabled'] | plus: 0 %} {% endif %} {% assign ssw_unite_reviews = 0 %} {% if shop.metafields.ssw['unite_reviews'] %} {% assign ssw_unite_reviews = shop.metafields.ssw['unite_reviews'] | plus: 0 %} {% endif %} {% if ssw_review_enabled == 1 %} {% assign ssw_count_rate = 0 %} {% assign ssw_avg_rate = 0 %} {% assign ssw_rate_data_key = 'review' %} {% if ssw_unite_reviews == 1 %} {% if shop.metafields.ssw['unite_product_ids'] %} {% assign ssw_unite_product_ids = shop.metafields.ssw['unite_product_ids'] | split: ',' %} {% assign unite_product_id = product.id | downcase %} {% if ssw_unite_product_ids contains unite_product_id %} {% assign ssw_rate_data_key = 'unite_review' %} {% endif %} {% endif %} {% endif %} {% assign gwReviewRateData = product.metafields.ssw[ssw_rate_data_key] %} {% if gwReviewRateData.type == 'json' %} {% assign gwReviewRateData = product.metafields.ssw[ssw_rate_data_key].value %} {% endif %} {% if gwReviewRateData %} {% assign ssw_count_rate = gwReviewRateData.count | plus: 0 %} {% assign ssw_avg_rate = gwReviewRateData.avg | plus: 0 %} {% assign ssw_product_id = product.id %} {% if gwReviewRateData.product_id %} {% assign ssw_product_id = gwReviewRateData.product_id | plus: 0 %} {% endif %} {% if ssw_product_id != product.id %} {% assign ssw_count_rate = 0 %} {% assign ssw_avg_rate = 0 %} {% endif %} {% endif %} {% if ssw_count_rate != 0 %} {% assign detailed_review_data = product.metafields.ssw['detailed_review_data'] %} {% if detailed_review_data.type == 'json' %} {% assign detailed_review_data = product.metafields.ssw['detailed_review_data'].value %} {% endif %} {% if rich_snippet_type == 'json' %} , "aggregateRating": { "@type": "AggregateRating", "ratingValue": "{{ ssw_avg_rate }}", "ratingCount": "{{ ssw_count_rate }}" }, {% if detailed_review_data %} "review": {{ detailed_review_data.json|json }} {% else %} "review": { "@type": "Review", "reviewRating": { "@type": "Rating", "ratingValue": "{{ ssw_avg_rate }}" }, "author": { "@type": "Person", "name": "{{ shop.name }} customers" } } {% endif %} {% else %} <div itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating"> <meta itemprop="ratingCount" content="{{ ssw_count_rate }}"/> <meta itemprop="ratingValue" content="{{ ssw_avg_rate }}"/> </div> {% if detailed_review_data %} {{ detailed_review_data.microdata }} {% else %} <div itemprop="review" itemscope itemtype="https://schema.org/Review"> <div itemprop="rating" itemscope itemtype="https://schema.org/Rating"> <meta itemprop="ratingValue" content="{{ ssw_avg_rate }}"/> </div> <div itemprop="author" itemscope itemtype="https://schema.org/Person"> <meta itemprop="name" content="{{ shop.name }} customers"/> </div> </div> {% endif %} {% endif %} {% endif %} {% endif %} {% endif %}
Locate product schema
On the live product page with published reviews, find the schema script that contains product metadata. It is typically structured in a <script>
tag with the attribute type="application/ld+json"
. Ensure that the "@type"
field is set to "Product"
.
Example:
<script type="application/ld+json"> { "@type": "Product" ... } </script>
Find file with schema
You’ll usually find the schema within the main product template file, often named product-template.liquid
or main-product.liquid
.
Integrate the rich snippet
- If the schema script uses the
json
type, insert the following snippet directly after the"offers"
field:
{% capture ssw_rich_snippet %}{% render 'ssw-widget-avg-rate-rich', rich_snippet_type: 'json' %}{% endcapture %}{% unless ssw_rich_snippet contains 'Liquid error' %}{{ ssw_rich_snippet }}{% endunless %}
NOTE: Ensure there is no comma before the snippet.
- If the schema is within a
<div>
element withitemtype="http://schema.org/Product"
, use the following variation:
{% capture ssw_rich_snippet %}{% render 'ssw-widget-avg-rate-rich %}{% endcapture %}{% unless ssw_rich_snippet contains 'Liquid error' %}{{ ssw_rich_snippet }}{% endunless %}
Verify integration success
Once added, your schema should now include aggregateRating
and review
fields, indicating a successful integration.
Alternative manual option
Growave users can manually add a snippet with the product’s average rating using metafield values. To use this snippet, follow the instructions for adding an average rating markup on the Schema.org website.
Schema.org snippets with Growave metafield values should be inserted into the default product page in your Shopify admin.
JSON-LD example:
"aggregateRating": { "@type": "AggregateRating", "ratingValue": "{{ product.metafields.ssw['review'].value.avg }}", "reviewCount": "{{ product.metafields.ssw['review'].value.count }}" }
Microdata example:
To offer an alternative for adding structured data, users can also use Microdata format with the itemscope
and itemprop
attributes in HTML. This method involves embedding structured data directly within the HTML of a webpage, as shown in the example below:
<div style="position:absolute;left:-9999px;" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <span itemprop="itemReviewed">{{product.title}}</span> <div>Product rating: <span itemprop="ratingValue">{{ product.metafields.ssw['review'].value.avg }}</span> out of <span itemprop="bestRating">5</span> with <span itemprop="ratingCount">{{ product.metafields.ssw['review'].value.count }}</span> ratings <span itemprop="worstRating">1</span> </div> </div>
Schema Plus integration
You can also enable integration with the paid third-party service Schema Plus to embed rich snippets effectively on your product pages. To integrate, go to the Growave admin panel, select Integrations, find Schema Plus, and click Enable. All further settings shall be applied directly in the Schema Plus app.
It may take Google several days to crawl your reviews, but once completed, the star ratings will appear in Google search results.
If you encounter any issues with adding these snippets or need further assistance, feel free to reach out to our support team at support@growave.io
How to verify rich snippets
To check if your product is displaying rich snippets, you can use tools like Google’s structured data testing tool, which provides a preview of how your product appears in search results. Here are two options for validating your rich snippets:
Rich Results Test
- Go to the Rich Results Test tool and enter your product link.
- The tool will check if your page supports rich results, verify if the widget is integrated correctly, and confirm if the widget is displayed in search results.
NOTE: This process may take some time. Ensure your product link has at least one review in the Growave app (the widget integration is not required as long as the review feature is enabled).
Schema.org Markup Validator
- Visit the Schema.org Markup Validator and insert your product link.
- This will validate your product schema and confirm the same details as the Rich Results Test tool.
NOTE: Again, ensure that your product link includes at least one review in the Growave app.
If you have any other questions or need assistance, don't hesitate to contact our support team at support@growave.io or through the chat icon in the bottom-right corner of the screen.