(perform(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.begin’:
new Date().getTime(),occasion:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=”+l:”‘;j.async=true;j.src=”https://www.googletagmanager.com/gtm.js?id=”+i+dl;f.parentNode.insertBefore(j,f);
})(window,doc,’script’,’dataLayer’,’GTM-WZZLD89′);
window.addEventListener(‘pushdatalayer’, perform(occasion) {
const part = occasion.element?.siteSection;
const subsection = occasion.element?.siteSubsection;
const pageUrl = occasion.element?.pageUrl;
const pageTitle = occasion.element?.pageTitle;
const promptSelection = occasion.element?.promptSelection;
const formId = occasion.element?.formId;
const dataLayerEvent = {
occasion: occasion.element.eventName,
eventCallback: perform () {
doc.dispatchEvent(new CustomEvent(‘postdatalayerpush’, {
bubbles: true,
composed: true,
element: occasion.element,
}));
},
};
if (part) {
dataLayerEvent[‘site_section’] = part;
}
if (subsection) {
dataLayerEvent[‘site_subsection’] = subsection;
}
if (pageUrl) {
dataLayerEvent[‘pageUrl’] = pageUrl;
}
if (pageTitle) {
dataLayerEvent[‘pageTitle’] = pageTitle;
}
if(promptSelection){
dataLayerEvent[‘promptSelection’] = promptSelection;
}
if(formId){
dataLayerEvent[‘form_ID’] = formId;
}
window.dataLayer = window.dataLayer || [];
window.dataLayer.push(dataLayerEvent);
});
doc.addEventListener(‘checkcookie’, () => {
var hasCookie = doc.cookie.cut up(‘;’)
.some((cookie) => cookie.trim().startsWith(‘CookieConsent=”));
doc.dispatchEvent(new CustomEvent(“hascookie’, { element: hasCookie }));
});
Adblock take a look at (Why?)