FROM CACHE - en_header

Google Customer Reviews

Simon71
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 - https://gist.github.com/joe-dempsey/4ed55937b7292907e90eae05d830b2ff/revisions

+<code>
+{% if customer.default_address.country | 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="https://apis.google.com/js/platform.js?onload=renderOptIn" 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": "{{ order.id }}",
+          "email": "{{ customer.email }}",
+          "delivery_country": "GB",
+          "estimated_delivery_date": "{{ "now" | date: "%s" | plus: seconds | date: "%Y-%m-%d" }}",
+          // OPTIONAL
+          "opt_in_style": "CENTRE_DIALOG"
+        }); 
+    });
+    }
+    </script>
+
+{% endif %}
+</code>

 

Replies 19 (19)
Simon71
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="https://apis.google.com/js/platform.js?onload=renderBadge" async defer></script>
<script>
  window.renderBadge = function() {
    var ratingBadgeContainer = document.createElement("div");
    document.body.appendChild(ratingBadgeContainer);
    window.gapi.load('ratingbadge', function() {
      window.gapi.ratingbadge.render(ratingBadgeContainer, {"merchant_id": XXXXXXXXX});
    });
  }
  window.___gcfg = {
  lang: 'en_US'
};
</script>
Josh_Uebergang
Shopify Expert
862 33 220

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): https://www.digitaldarts.com.au/google-shopping
KiwiShopper
Tourist
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?

 

Cheers!

 

Josh_Uebergang
Shopify Expert
862 33 220

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): https://www.digitaldarts.com.au/google-shopping
Krafty-Koala
New Member
3 0 0

@Josh_Uebergang Hi Josh, I've been reading your guides and trying to get Google Reviews on my site. I've got everything working according to your guide but when the Google opt in box shows it says 'Can Google email you (customer.email) a one minute survery etc etc

 

I have tried every different property of customer email to get it right such as email, customer.email, customer_email, order.email etc etc but every single one shows up between the brackets. I even tried a few that shopify suggested but nothing is working.

 

"order_id": "{{ order.name }}",

 

I have also changed this to  "order_id": "order_number", as it seems to be different according to shopify's guide here: https://help.shopify.com/en/manual/sell-online/notifications/email-variables

 

Could you shed any light on it?

Josh_Uebergang
Shopify Expert
862 33 220

Hey @Krafty-Koala. What is the full code you are actually using? Include all the code in the checkout section. If you are seeing brackets, you have something not right interfering with the standard liquid.

 

Also test just having nothing but the reviews code.

 

I have re-tested my guide just then on a store and it is working fine.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
LaurentH
New Member
12 0 0

Hi @Josh_Uebergang

Do you have any advice how to display Google reviews on a Shopify page?

I am not looking to rate the product that I sell, however my clients post review on my overall business (French pastry shop) and I would like to display these reviews on one of my Shopify site.

Many thanks,

 

Laurent

 

Josh_Uebergang
Shopify Expert
862 33 220

@LaurentH Refer to the setup guide I linked to in my first reply. Google Customer Reviews offers this option.

 

However, if you're referring to reviews from your Google My Business listing, that is a different thing altogether. See this guide.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
LaurentH
New Member
12 0 0

Thanks Josh

DougAxen
Tourist
12 2 0

Hey,

 

Do I absolutely have to use the opt-in code/function on my checkout page? 

We currently collect google reviews by using Mailchimp, we have an automated email sent out to customers xx days after they've received their product. In the email, it is linked to our GMB page asking them to review. So we do not want this review opt in code for our customers on our checkout page. 

 

We only want the badge code on our website to display our ratings. 

Currently, we have over 150+ reviews and we tried to implement the badge code on our website and the box shows up but with no ratings. 

 

Is it possible that there is just a delay for our rating to show up or do we have to use the opt-in to make the badge code work?

DougAxen
Tourist
12 2 0

@Josh_Uebergang 

 

Hey,

 

Do I absolutely have to use the opt-in code/function on my checkout page? 

We currently collect google reviews by using Mailchimp, we have an automated email sent out to customers xx days after they've received their product. In the email, it is linked to our GMB page asking them to review. So we do not want this review opt in code for our customers on our checkout page. 

 

We only want the badge code on our website to display our ratings. 

Currently, we have over 150+ reviews and we tried to implement the badge code on our website and the box shows up but with no ratings. 

 

Is it possible that there is just a delay for our rating to show up or do we have to use the opt-in to make the badge code work?

Josh_Uebergang
Shopify Expert
862 33 220

Asking for a review via Google My Business is completely different to Google Customer Reviews. You can see my tutorial for what Google Customer Reviews is in Shopify. So first, you need to decide which one you want to use. You may want to use both.

 

Stores with a retail front should have at least 10 good reviews on GMB to help build trust from possible SERP when the GMB snippet is displayed.

 

For Google Customer Reviews, it isn't enough to have over 150 reviews. You need the reviews to be in a 12 month timeline. You can review Merchant Center to see if you are eligible for Seller Ratings, which is how you know when you have enough reviews via the platform.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
DougAxen
Tourist
12 2 0

@Josh_Uebergang 

 

I understand which brings me to another question:

 

Is there a way to integrate/embed in our Shopify store, a similar badge or just visually show our GMB star ratings? 

I know there is Javascript code that can automatically show the reviews made in GMB but we only want the star rating to show.

 

 

Josh_Uebergang
Shopify Expert
862 33 220

Not that I know of. An alternative is to get something designed that aims to replicate it. I don't know if there's an API for it, so check that. If there isn't, you'd want a settings in your theme options to be able to update the review number so it's reflective and accurate of the live GMB review data.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
ShirleyDeng
New Member
1 0 0

Hi Josh, 

 

Where to paste the code of "Google Customer Review Survey Opt-in Module" in Shopify?  Thanks in advance. 

Uladzimir
Shopify Partner
12 0 0

Hi,

You can display your Google My Business reviews using Google Reviews & Rating Widget app.

Ashish_Soni
Excursionist
11 0 2

Thank you very much for your insightful article. We're able to integrate this easily into our store Flower Station Dubai within a few minutes.

Ashish_Soni
Excursionist
11 0 2

Thank you very much for your insightful article. We're able to integrate this easily into our store Flower Delivery Dubai within a few minutes.

thefourthplace
Excursionist
33 0 33

@Josh - I used your guide to set this up, and I can see the code I expect when I inspect a Thank You page (logged in properly so I can see order details). However, the pop-up never appears.

 

Any idea what could be wrong? (I am using Shopify OS 2.0 Dawn theme, if that helps.)

 

https://thefourthplaceforgeeks.com/53544026284/orders/3bd376eeb7b5a136d4ad34e0922e7f5d

 

 

UPDATE: I solved this myself.

 

I have nested Google Merchant center accounts. Using the main account ID (as Google settings suggested) didn't work, but using the sub-account ID worked.

Ian Struckhoff
The Fourth Place
https://thefourthplaceforgeeks.com