diff --git a/core/core.js.php b/core/core.js.php index c4815a35..56e55b04 100644 --- a/core/core.js.php +++ b/core/core.js.php @@ -229,7 +229,7 @@ core.start = function() { // Traitement du retour de la checkbox if ($("#googleAnalytics").is(":checked")) { // L'URL du serveur faut TRUE - document.cookie = "ZWII_COOKIE_GA_CONSENT=" + "" + ";" + domain + ";" + path + ";" + samesite + ";" + expires; + document.cookie = "ZWII_COOKIE_GA_CONSENT=true;" + domain + ";" + path + ";" + samesite + ";" + expires; } else { document.cookie = "ZWII_COOKIE_GA_CONSENT=false;" + domain + ";" + path + ";" + samesite + ";" + expires; } @@ -237,7 +237,7 @@ core.start = function() { } // Stocke le cookie d'acceptation - document.cookie = "ZWII_COOKIE_CONSENT=;" + domain + ";" + path + ";" + samesite + ";" + expires; + document.cookie = "ZWII_COOKIE_CONSENT=true;" + domain + ";" + path + ";" + samesite + ";" + expires; }); diff --git a/core/core.php b/core/core.php index 2fcd9f95..ba048298 100644 --- a/core/core.php +++ b/core/core.php @@ -1180,7 +1180,7 @@ class common { */ public function showAnalytics() { if( !empty($code = $this->getData(['config', 'seo', 'analyticsId'])) && - $this->getInput('ZWII_COOKIE_GA_CONSENT') === $_SERVER['PHP_SELF'] ) { + $this->getInput('ZWII_COOKIE_GA_CONSENT') === 'true' ) { echo '