1window.dataLayer = window.dataLayer || []; 2function gtag() { 3 dataLayer.push(arguments); 4} 5gtag('js', new Date()); 6// Drupal's global gtag ID. For more info: https://developers.google.com/tag-platform/devguides/gtag-integration 7gtag('set', 'developer_id.dMDhkMT', true); 8 9(function (drupalSettings) { 10 if (!drupalSettings.gtag) {return;} 11 const config = drupalSettings.gtag; 12 13 if (config.consentMode === true) { 14 gtag('consent', 'default', { 15 ad_storage: 'denied', 16 analytics_storage: 'denied', 17 ad_user_data: 'denied', 18 ad_personalization: 'denied', 19 wait_for_update: 500, 20 }); 21 } 22 23 if (config.tagId.length !== 0) { 24 const script = document.createElement('script'); 25 script.async = true; 26 script.src = `https://www.googletagmanager.com/gtag/js?id=${config.tagId}`; 27 script.type = 'text/javascript'; 28 if ( 29 typeof drupalSettings.csp !== 'undefined' && 30 typeof drupalSettings.csp.nonce !== 'undefined' 31 ) { 32 script.setAttribute('nonce', drupalSettings.csp.nonce); 33 } 34 document.getElementsByTagName('head')[0].appendChild(script); 35 } 36 37 const additionalConfigInfo = config.additionalConfigInfo || []; 38 if (additionalConfigInfo.length === 0) { 39 gtag('config', config.tagId); 40 } else { 41 gtag('config', config.tagId, additionalConfigInfo); 42 } 43 44 const otherIds = config.otherIds || []; 45 otherIds.forEach((id) => gtag('config', id)); 46 47 const events = config.events || []; 48 events.forEach((event) => gtag('event', event.name, event.data)); 49})(drupalSettings);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.