Richardf21 Posted January 20, 2021 Posted January 20, 2021 So, I'm trying to implement Google customer reviews survey from Google merchant centre. However I have come to realise it won't work without being able to grab a date. Is there a way to add Order placed at XXXX-XX-XX with some javascript on the confirmation page? The hope is once /if I can add that a date to the page, I can then edit the GCR code to grab that date and add a delay GCR code looks something like this but this needs editing <!-- BEGIN GCR Opt-in Module Code --><script src="https://apis.google.com/js/platform.js?onload=renderOptIn" async defer></script><script>// <![CDATA[var currentTime = new Date()var day = currentTime.getDate() + 10var month = currentTime.getMonth() + 1var year = currentTime.getFullYear()var final =(year + "/" + month + "/" + day) window.renderOptIn = function() { window.gapi.load('surveyoptin', function() { window.gapi.surveyoptin.render( { // REQUIRED FIELDS "merchant_id": "****", "order_id": "{orderId}", "email": "{customerEmailAddress}", "delivery_country": "GB", "estimated_delivery_date": "final", }); }); }</script>
tuanphan Posted January 23, 2021 Posted January 23, 2021 Hi, If you haven't received an answer yet, you can post on some FB groups + Squarespace Customization Resource Groups + Squarespace Community + Squarespace Entrepreneur + Squarespace Rockstars Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.