Categories

Display review stars on the Google search results by Review Snippet Code

You can improve your SEO and click-through rate by displaying your product star ratings in Google organic search results. Google can display the review stars only if it finds valid reviews or ratings markup on your product page. That means you first need to add a Review snippet into your theme’s product page.

How to add the Review snippet?

Fortutenaly, FarOut Product Reviews & Referrals app is able to automatically inject the Review snippet into your product page upon installation. For doing so, we scan your theme to find the product liquid file (usually it’s called product-template.liquid or product.liquid.), and then insert the Review snippet per Google’s instructions.

Review snippet is found in the Rich Results Test toolReview snippet is found in the Rich Results Test tool

How to manually add the Review snippet?

For some themes, because the product liquid file has a different name, we may not be able to find the right liquid file. In this situation, you can manually add FarOut’s Review Snippets code by following these instructions:

    1. Go to your Shopify Themes menu (from Admin -> Online Store -> Themes)
    2. On your current theme, click on the “Actions” button and then select “Edit code”.
    3. Open the template or section you use for product pages (usually it’s called product-template.liquid or product.liquid. But, some themes work differently).
    4. Copy and paste the following code into your product liquid file:
{% if product.metafields.farout.num_reviews %}
<script id="faroutSchemaJson" type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"@id": {{ canonical_url | json }},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "{{ product.metafields.farout.avg_rating }}",
"reviewCount": "{{ product.metafields.farout.num_reviews }}"
},
"name": {{ product.title | json }}
}
</script>
{% endif %}

The photo below shows an example of how to add the FarOut’s Review Snippets code on the product-template.liquid file:

If you couldn’t do the above steps for changing your liquid files, please feel free to contact us or directly email me at sina@far-out.io. We’d love to help you.

Shopping Basket