Google Product Reviews Survey Opt-In Module Code for Order Conf page

Google Product Reviews Survey Opt-In Module Code for Order Conf page

ridethedesert
Excursionist
13 0 4

Hi,

 

I'm trying to add Google Product Reviews code to my Shopify Confirmation page. How do we make this work?

 

https://support.google.com/merchants/answer/7106244?hl=en&sjid=1355656527919146021-NC&visit_id=63843...

 

Shopify said to go to settings, checkout and scroll down to order status page and add the code to the additional scripts section. However, there is language in the code that needs to be modified. See attached screenshot.

 

Anyone have any experience getting this to work?g.png

Replies 7 (7)

Phani
Shopify Partner
4 0 1

After upgrading to the Shopify extensibilty, the Google opt-in reviews are not working. We have moved the code to the customer events sections as well, but still not working. Can you please help us in fixing this issue.

Maz
Shopify Staff
1254 131 189

Hi, @Phani!

 

Thanks for reaching out here.

 

For context, our Community team can't access accounts from our end, however we'd be happy to continue to assist you via our live support channels here at the link. Please share your query there so that our team can investigate this further! 

Maz | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

p1simgear
Excursionist
56 0 6

Is there any update please to this issue? This is not working for us either.  Thanks

Nowell
Excursionist
34 2 19

If you are still trying to do this, here is the code we use in additional scripts. Just put your Google merchant id in the merchant_id field. This doesn't work with the new Shopify post-purchase page, so if you have upgraded to that, it won't work. I am waiting for help from Google and Shopify for a solution, so we can upgrade to the new page and still use the Google opt-in script:

 


{% 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": "123456789",
"order_id": "{{ checkout.order_id }}",
"email": "{{ email }}",
"delivery_country": "{{ shipping_address.country_code }}",
"estimated_delivery_date": "{{ created_at | date:'%s' | plus:604800 | date:'%F' }}"
});
});
}
window.___gcfg = {
lang: '{{ shop_locale.iso_code }}'
};
</script>
<!-- END Google Customer Reviews -->
{% endif %}

<!-- BEGIN GCR Language Code -->

<script>

window.___gcfg = {

lang: 'en-US'

};

</script>

<!-- END GCR Language Code -->

TPloszaj
Tourist
3 0 2

Isn't the Additional Scripts function depreciated?

Nowell
Excursionist
34 2 19

Yes. If you have upgraded to the new checkout extensibility, this code will not work. Unfortunately, Shopify has no solution for the scripts being deprecated as of yet.

RoseJannuzzi
Shopify Partner
17 0 11

Following this thread as I have a client wanting to add this script to their site