first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
var dataToPushToDl = getupdatedValues(cookieTypes, cookieRootName);
dataToPushToDl.event = "beautiful_cookie_consent_updated";
// goal: remove dismiss completly from application. Problem: is saved in cookie for "just info". For backward compatibility hard to change.
// first step: in datalayer dismiss will never appear.
if (status === "dismiss") {
status = "allow";
}
dataToPushToDl.cookieconsent_status = status;
dataToPushToDl.statusBefore = chosenBefore;
window[dataLayerName] = window[dataLayerName] || [];
window[dataLayerName].push(dataToPushToDl);
function getupdatedValues(cookieTypes, cookieRootName) {
var updatedValues = {};
for (var i = 0, len = cookieTypes.length; i < len; i += 1) {
var b = document.cookie.match(
"(^|;)\\s*" + cookieRootName + "_" + cookieTypes[i]["cookie_suffix"] + "\\s*=\\s*([^;]+)"
);
var cookieValue = b ? b.pop() : "";
if (cookieValue) {
updatedValues["cookieconsent_status_" + cookieTypes[i]["cookie_suffix"]] = cookieValue;
}
}
return updatedValues;
}