Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
I'm trying to add Google Product Reviews code to my Shopify Confirmation page. How do we make this work?
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?
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.
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
Is there any update please to this issue? This is not working for us either. Thanks
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 -->
Isn't the Additional Scripts function depreciated?
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.
Following this thread as I have a client wanting to add this script to their site
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024