I have this so far
<!-- BEGIN GCR Opt-in Module Code -->
<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": 280599083,
"order_id": "{orderId}",
"email": "{customerEmailAddress}",
"delivery_country": "GB",
"estimated_delivery_date": "YYYY-MM-DD" ,
"opt_in_style": "BOTTOM_LEFT_DIALOG"
});
});
}
</script>
<!-- END GCR Opt-in Module Code -->
<!-- BEGIN GCR Language Code -->
<script>
window.___gcfg = {
lang: 'en-GB'
};
</script>
<!-- END GCR Language Code -->
just need some JS to pull the date in the order "YYYY-MM-DD" from the order confirmation and add 4 days. anyone know how to write that in js?