Displaying Product Ratings in Google Search Results

Boost your store's traffic and grow interest in your products organically by displaying your product ratings and reviews in Google search results using Google Rich Snippets.

When enabled, Loox will automatically add the relevant rich snippets code to your store's theme, integrating your products' average rating, as well as their reviews on Google's search results.

To show your product ratings and reviews in Google search results:

  • Inside the Loox app's "Settings" section, go to “General”:
  • Scroll down and open the tab “SEO - Google search results”:

  • Toggle “show product ratings and reviews in Google search results” on:

And that’s it!

The Google Rich Snippets code has now been added to your theme.

Note: It might take up to 30 days for your ratings to appear on your products’ search results, as it can take Google some time to re-index your pages' information.

If you’d like, you can request Google to recrawl your store’s URL.


Manually adding the Rich Snippets code

You can manually add the Rich snippets code to your theme, giving you the option to manually adjust the parameters reported to Google.

To manually add the Rich snippet's code to your theme:

  • Inside your Shopify Themes menu, click the “...” button next to “Customize” and select "Edit code".
  • Open the template or section you use for product pages (usually called product.liquid or product-template.liquid, but some themes may work differently).
  • Paste the following code at the bottom of the page:
{% if product.metafields.loox.num_reviews %}
<script id="looxSchemaJson" type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",   
"@id": {{ canonical_url | json }},   
"aggregateRating": { 
"@type": "AggregateRating",      
"ratingValue": "{{ product.metafields.loox.avg_rating }}",      
"reviewCount": "{{ product.metafields.loox.num_reviews }}"   
},   
"name": {{ product.title | json }}
}
</script>
{% endif %}

Some themes report review data to Google differently.

If your theme uses Meta tags, follow these steps instead:

  • Inside your Shopify Themes menu, click the “...” button next to “Customize” and select "Edit code".
  • Open the template or section you use for product pages (usually called product.liquid or product-template.liquid, but some themes may work differently).
  • Click CTRL + F
  • Search for: ״http://schema.org/Product״.
  • Paste the following code beneath the relevant element (for example: <div itemscope itemtype="http://schema.org/Product">): 
{% if product.metafields.loox.num_reviews %}
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="{{ product.metafields.loox.avg_rating }}"/>
<meta itemprop="ratingCount" content="{{ product.metafields.loox.num_reviews }}"/> 
</div>
{% endif %}

Notes:

  • You can verify the code using Google's structured data testing tool. For products with at least one review, you should see an "aggregateRating" attribute under the Product object.
  • It might take up to 30 days for your ratings to appear on your products’ search results, as it can take Google some time to re-index your pages' information.

    If you’d like, you can request Google to recrawl your store’s URL.

If you need help editing your Liquid code, contact our Support team at [email protected]. We’re available 24/7 and happy to help!

Still need help? Contact Us Contact Us