Changing an Order Status Page Additional Script to a Customer Event?

Changing an Order Status Page Additional Script to a Customer Event?

RareVinyl
Tourist
9 1 3

We have this Order status page additional scripts to collect Google Reviews

 

How do we change it to the new customer event?

 

<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": 12345678910,

"order_id": "{{ checkout.order.id }}",

"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' }}",

});

});

};

</script>

Replies 0 (0)