Google Customer Reviews

New Member
2 0 1

I would like to add Google Customer Reviews to my store without having to pay for an app or expert to do so.

Where do I paste this code in Shopify (I know I will have to add my Merchant ID) -

Source -

+{% if | json  == 'United Kingdom' %}
+{% comment %}
+Delivery may take up to 7 days in this case so we're doing date + 7 days and assigning it.
+{% endcomment %}
+{% assign seconds = 7 | times: 24 | times: 60 | times: 60 %}
+    <script src="" async defer></script>
+    <script>
+        window.renderOptIn = function() { 
+        window.gapi.load('surveyoptin', function() {
+        window.gapi.surveyoptin.render(
+        {
+          // REQUIRED
+          "merchant_id": enter your merchant id here,
+          "order_id": "{{ }}",
+          "email": "{{ }}",
+          "delivery_country": "GB",
+          "estimated_delivery_date": "{{ "now" | date: "%s" | plus: seconds | date: "%Y-%m-%d" }}",
+          // OPTIONAL
+          "opt_in_style": "CENTRE_DIALOG"
+        }); 
+    });
+    }
+    </script>
+{% endif %}


1 Like
New Member
2 0 1

Do I add a Templates, Snippets or Assets and call it shopify-reviews.liquid then paste the code above or do i go to admin/settings/checkout and paste it in additional scripts?

Also If I woulld like to display the badge on my store, I believe I can copy-and-paste the snippet before the closing </body> in my theme.liquid file. Replace XXXXXXXXX with your merchant ID:

<script src="" async defer></script>
  window.renderBadge = function() {
    var ratingBadgeContainer = document.createElement("div");
    window.gapi.load('ratingbadge', function() {
      window.gapi.ratingbadge.render(ratingBadgeContainer, {"merchant_id": XXXXXXXXX});
  window.___gcfg = {
  lang: 'en_US'

Hi Simon,

See my guide to integrate Google Customer Reviews with Shopify. It has all the info there. The script you first mentioned needs to get on the thank you page while the badge goes in your theme.liquid file.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required):
5 0 0

Hi Josh,


do you have any advice for integrating Google Reviews if I'm using Shopify with only "Buy Now" buttons rather than the shop? Can I still paste the above code in the additional scripts box in the checkout?





I haven't used it in the case of those who just have Buy Now buttons, but it should work for you as well because it's dependent only on the checkout.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required):
1 Like