How To Add Google Customer Reviews to Shopify Checkout

To add Google Customer Reviews to your Shopify site, you need to take serval steps within Google Merchant Center and Shopify. Let us look at everything you need, from code to configuration.

Google Customer Reviews is a free opt-in program offered on the Google Merchant Center to help improve your ranking in the Google Shopping feed and in Google Ads. The program allows customers to rate their purchase experience with your e-commerce store – such as your Shopify store.

Google Customer Reviews

To add Google Customer Reviews to your Shopify store:

  • Step 1: Log in to your Google Merchant Center account.
  • Step 2: Go to “Growth > Manage programs”.
  • Step 3: Activate “Customer Reviews”.
  • Step 4: Log in to your Shopify store.
  • Step 4: Go to “Settings > Checkout > Order status page”.
  • Step 5: Add the following JavaScript snippet to your Shopify “Order status page” form field.

Shopify Google Customer Reviews Opt-in Code Snippet

Copy and paste the following JavaScript snippet into your Shopify “Order status page” input box. Then replace the XXXXXXXX portion with your Merchant ID.

The Shopify code snippet is configured to:

  • Display the Google Customer Review opt-in box when a customer reaches the order status page for the first time. They may opt-in or opt-out at this point.
  • Will not display the opt-in after the first viewing of the page.
  • Will email the customer a request for the review 7 days after ordering (you can customize the delay if needed).
  • Will not provide Google with specific GTIN information (providing GTIN formation is not required).
{% if first_time_accessed %}
<!-- BEGIN Google Customer Reviews -->
<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(
        {
          "merchant_id": "XXXXXXXX",
          "order_id": "{{ checkout.name }}",
          "email": "{{ checkout.order.email }}",
          "delivery_country": "{{ checkout.order.shipping_address.country_code }}",
          "estimated_delivery_date": "{{ checkout.order.created_at | date:'%s' | plus:604800 | date:'%F' }}"
        });
    });
  }
  window.___gcfg = {
    lang: '{{ shop_locale.iso_code }}'
  };
</script>
<!-- END Google Customer Reviews -->
{% endif %}

You can customize the review request’s time to send by modifying the plus:604800 part of the snippet. For example, plus:86400 will send the review request 1 day later (86400 seconds in 2 days). Here are several time values:

  • 1 Day: 86400
  • 2 Days: 172800
  • 3 Days: 259200
  • 4 Days: 345600
  • 5 Days: 432000
  • 6 Days: 518400
  • 7 Days: 604800

Shopify Liquid Template Code

Finally, you can learn more about this Shopify code snippet by learning how to use the liquid template engine and the first_time_accessed liquid template keyword.

Wait For Google Customer Reviews

As with all Google programs seeing the results of this customer review program can take some time. Google needs to collect enough data from your website before anything will take effect. Make sure you have completed the opt-in integration steps.

Note: It may take a few days for your data to appear.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.