diff --git a/Resources/Public/JavaScript/Main.js b/Resources/Public/JavaScript/Main.js index b85212d..62fa62d 100644 --- a/Resources/Public/JavaScript/Main.js +++ b/Resources/Public/JavaScript/Main.js @@ -209,7 +209,7 @@ function saveConsentToCookie(inputs, userId) { expireDate: expireDate.toUTCString() }; - var cookieParams = encodeURI(JSON.stringify(cookieData)) + "; expires=" + expireDate.toUTCString() + "; path=/; " + (KD_GDPR_CC.cookieDomainName ? ('domain=' + KD_GDPR_CC.cookieDomainName + ';') : '') +" Secure;"; + var cookieParams = encodeURI(JSON.stringify(cookieData)) + "; expires=" + new Date(currentDate.getTime() + 315360000000).toUTCString() + "; path=/; " + (KD_GDPR_CC.cookieDomainName ? ('domain=' + KD_GDPR_CC.cookieDomainName + ';') : '') + (location.protocol.substring(0,5) === 'https' ? " Secure;" : ''); document.cookie = KD_GDPR_CC.cookieName + "=" + cookieParams; window.dataLayer = window.dataLayer || [];