Discussions
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Join us
How to add Google Customer Reviews "opt-in" script in SCA site
We got the below script for adding Google Customer Reviews to our website. It needs to added to order confirmation page.
But there are two options in SCA:
1. order_wizard_confirmation_module.tpl in order confirmation module
2. SCA Web Set Up - Analytics sub tab - Order Confirmation Page
<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 FIELDS
"merchant_id": ID,
"order_id": "<%=getCurrentAttribute('confirmation','ordernumber')%>",
"email": "<%=getCurrentAttribute('customer','email')%>",
"delivery_country": "<%=getCurrentAttribute('confirmation','shiptocountry')%>",
"estimated_delivery_date": "YY-MM-DD"
});
});
}
</script>