Displaying Star Ratings on Organic Google Search Results

Upon installation, Loox injects the Rich Snippets code (which is responsible for integrating your reviews data to Google) to your product page.

We recommend that you verify your Rich Snippets integration using Google's structured data testing tool on a product with a least one approved review. You should see a section named "aggregateRating" under the Product object:

Note: Star ratings may not appear on live searches until Google recrawls and reindexes your store's pages. It might take up to several weeks for Google to recrawl your store's pages. If you wish, you can ask Google to recrawl your URLs.


You can manually add Loox's Rich Snippets code by following these instructions:

  1. Go to your Shopify Themes menu.
  2. Click the "Actions" menu and then select "Edit code".
  3. Open the template or section you use for product pages (usually called product.liquid or product-template.liquid, but some themes may work differently).
  4. 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 %}
    	

It should look like this:

If you're having trouble editing your Liquid code, feel free to contact our Support team at [email protected], and we’d be more than happy to help!


On some Shopify themes, your Rich Snippets data might be reported differently. If this is the case, follow these steps:

  1. Go to your Shopify Themes menu.
  2. Click the "Actions" menu and then select "Edit code".
  3. Open the template or section you use for product pages (usually called product.liquid or product-template.liquid, but some themes may work differently).
  4. Click CTRL + F
  5. Search the following:
    http://schema.org/Product
  6. Find an element with this attribute, for example:
    <div itemscope itemtype=" http://schema.org/Product">
  7. Paste the following code beneath said code line:
    {% 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 %}
    	

It should look like this:

If you're having trouble editing your Liquid code, please contact us, and we'll be happy to assist!