This commit is contained in:
Deborah Barnard
2022-11-23 17:27:41 +00:00
parent c52d195d92
commit 9836368bf6

View File

@@ -1,13 +1,14 @@
// If the user has accepted cookies, set the n8n-consent cookie
// This means if they then go to the website, they won't be prompted again
var consent = __md_get("__consent")
if (consent.analytics === true) {
if (consent && consent.analytics === true) {
document.cookie = "n8n-consent={'consent': true};path=/;domain=n8n.io";
}
// If the user already has the n8n-consent cookie, accept cookies in docs as well
let n8nCookieConsent = getCookie("n8n-consent");
if(n8nCookieConsent.consent === true) {
console.log(n8nCookieConsent);
if(n8nCookieConsent && n8nCookieConsent === true) {
console.log(n8nCookieConsent);
__md_set("__consent", {"analytics": true})
}