Last active
September 11, 2024 22:29
-
-
Save AertHulsebos/efc1923931ba1afc47d2510af769a69e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
l = s => s == undefined ? "" : s ? "granted" : "denied"; | |
c = s => s == "granted" ? "color: #29b6f6": "color: #C00"; | |
if (!"google_tag_data" in window) { | |
console.log("No Consent Mode data found, please check your Complianz settings."); | |
return; | |
} | |
var g = google_tag_data.ics.entries, i = "", t = "", u = ""; | |
for (var a in g) { | |
i = l(g[a]['initial']); | |
u = l(g[a]['update']); | |
if (i == "" && u == "") continue; | |
t = ("\t" + a + ":" + | |
(i != "" ? "\n\t\tDefault: %c" + i : "%c") + "%c" + | |
(u != "" ? "\n\t\tUpdate: %c" + u : "%c")); | |
console.log(t, i != "" ? c(i) : "", "", u != "" ? c(u) : "", ""); | |
} | |
if (i == "") console.log(""); | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment