const regimes = window.airgap && window.airgap.getRegimes ? window.airgap.getRegimes() : null; const defaultRegime = regimes ? regimes.values().next().value : "CPRA"; console.log("Regime detected is "+ defaultRegime + ", loading transcend") if (!EB.TranscendConsent.shouldDisableTranscend()) { try{ // Add the event listener window.airgap.addEventListener( 'sync', () => { console.log("Sync done: Show banner") window.transcend.ready((transcend) => { transcend.autoShowConsentManager(); }) }, { once: true } // we only want this to run on initial sync ); }catch(error) { console.error("Failed to sync and load the banner") } } else { console.log("Do not show banner") } dataLayer.push({ event: "transcendLoaded" });