var gtmScriptincludeVersion = "2.4"; var gtm_id = 'GTM-PF985GMF'; var gtm_src = 'tc.commerzbank.de'; if (window.cookieBox && window.cookieBox.isInitialised) { initGTM(); } else { window.addEventListener('consents_initialized', function () { initGTM(); }) } function initGTM() { // Push "GTM Custom Template Restrictions" in data layer function gtag() { dataLayer.push(arguments); } // Push "GTM Start Event" in data layer (window.dataLayer = window.dataLayer || []).push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' }); // Set Template-ID for Tag Management Service: mIEB9cNKW var consent = window.cookieBox.getConsents('Tag Management'); if (consent.consentStatus) { loadGTM(); } else { // new for FK dataLayer.push = function (n) { // Basic Object Push dataLayer[this.length] = n; // GTM Integration if (n["event"] == "all_consents_given_status") { var consent = window.cookieBox.getConsents("Tag Management"); if (consent.consentStatus) { loadGTM() } } } } function loadGTM(){ // Include GTM window.gtmId = gtm_id; (function (w, d, s, l, i) { var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = '//' + gtm_src + '/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); })(window, document, 'script', 'dataLayer', window.gtmId); } }