This commit is contained in:
Set Sakrecoer 2021-10-12 13:47:30 +02:00
parent 8afd1d452f
commit 8ab6e28858

View file

@ -40,33 +40,21 @@
function eraseCookie(name) {
createCookie(name, "", -1);
}
if (readCookie('cookie-notice-dismissed') == 'wantCookies') {
{% include mautic-tracker.js %}
{% include mautic - tracker.js %}
} else {
document.getElementById('cookie-notice').style.display = 'flex';
}
if (readCookie('cookie-notice-dismissed') == 'dontWantCookies') {
document.getElementById('cookie-notice').style.display = 'none';
}
document.getElementById('cookie-notice-accept').addEventListener("click", function () {
createCookie('cookie-notice-dismissed', 'wantCookies', 365);
document.getElementById('cookie-notice').style.display = 'none';
_paq.push(['trackEvent', 'Consent', 'wantCookie']);
});
document.getElementById('cookie-notice-decline').addEventListener("click", function () {
createCookie('cookie-notice-dismissed', 'dontWantCookies', 365);
document.getElementById('cookie-notice').style.display = 'none';
_paq.push(['trackEvent', 'Consent', 'dontWantCookie']);
});
</script>