Does anyone have experience with Google Customer Reviews Opt-in Integration on the order confirmation page?
I've followed all the instructions to the best of my understanding, but don't see the Opt-in dialog box appear on the order confirmation page when in test mode. For 7.1, if it matters.
*EDIT - Works if I put in a static date, but fails if I use PHP for a dynamic delivery date. I have no experience with PHP, so I don't know what the issue might be.
Here is my code in Settings>Advanced>Code Injection>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": *********,
"order_id": "{orderId}",
"email": "{customerEmailAddress}",
"delivery_country": "US",
"estimated_delivery_date": "<?php echo date("Y-m-d", strtotime("+ 7 days")); ?>"
});
});
}
</script>
Google's instructions are here - https://support.google.com/merchants/answer/7106244
Thanks for your advice!