function getCookie(cookieName) {
let namePrefix = cookieName + '=';
let decodedCookie = decodeURIComponent(document.cookie);
let cookiesArray = decodedCookie.split(';');
for(let i = 0; i
var waitForFinalEvent = (function () { var timers = {}; return function (callback, ms, uniqueId) { if (timers[uniqueId]) { clearTimeout (timers[uniqueId]); } timers[uniqueId] = setTimeout(callback, ms); }; })();
function setConsent(action, analyticsStorageAllowed, adStorageAllowed) {
gtag('consent', action, { analytics_storage: analyticsStorageAllowed ? 'granted' : 'denied', ad_storage: adStorageAllowed ? 'granted' : 'denied', ad_user_data: adStorageAllowed ? 'granted' : 'denied', ad_personalization: adStorageAllowed ? 'granted' : 'denied', personalization_storage: 'denied', functionality_storage: 'denied', security_storage: 'denied', wait_for_update: 500 }); gtag('set', 'ads_data_redaction', true);
if (action === 'update') { dataLayer.push({ event: 'consent_update' }); }
}
setConsent('default', analyticsStorageAllowed, adStorageAllowed);
document.addEventListener('cmplz_status_change', function () { waitForFinalEvent(function() { setConsent('update', cmplz_has_consent('statistics'), cmplz_has_consent('marketing')); }, 300, 'consent_update'); });