(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://analytics.unicef.no/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-5S8W'); // setTimeout is needed in case this script tag is run before oasis script setTimeout(function(){ if (typeof ga !== "undefined") { let gaId = ''; ga.getAll().forEach( (tracker) => { gaId = tracker.get('clientId'); }); window.gaId = gaId; } }, 3000); // setTimeout is needed in case this script tag is run before oasis script setTimeout(function(){ if (typeof gtag !== "undefined") { gtag('get', 'G-JN1SHR8FLC', 'client_id', (client_id) => { window.ga4Id = client_id; }); } }, 3000); // setTimeout is needed in case this script tag is run before oasis script setTimeout(function(){ if (typeof gtag !== "undefined") { gtag('get', 'G-JN1SHR8FLC', 'session_id', (session_id) => { window.ga4SessionId = session_id; }); } }, 3020); // setTimeout is needed in case this script tag is run before oasis script setTimeout(function(){ let hasConsentedToStatistics = false; let hasConsentedToMarketing = false; const consentCookieRAW = (document.cookie.match('(^|;)\\s*' + 'CookieInformationConsent' + '\\s*=\\s*([^;]+)')?.pop() || ''); const consentCookieJSONString = (decodeURIComponent(consentCookieRAW) || ''); if (consentCookieJSONString !== null && consentCookieJSONString !== '') { const consentCookieJSON = JSON.parse(consentCookieJSONString); if (consentCookieJSON && consentCookieJSON.consents_approved?.length > 0) { for (let x of consentCookieJSON.consents_approved) { if (x === 'cookie_cat_statistic') { hasConsentedToStatistics = true; } if (x === 'cookie_cat_marketing') { hasConsentedToMarketing = true; } } } } window.hasConsentedToStatistics = hasConsentedToStatistics; window.hasConsentedToMarketing = hasConsentedToMarketing; }, 3030);