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 document.getElementsByTagName('head')[0].appendChild(script); 29 } 30 31 const additionalConfigInfo = config.additionalConfigInfo || []; 32 if (additionalConfigInfo.length === 0) { 33 gtag('config', config.tagId); 34 } else { 35 gtag('config', config.tagId, additionalConfigInfo); 36 } 37 38 const otherIds = config.otherIds || []; 39 otherIds.forEach((id) => gtag('config', id)); 40 41 const events = config.events || []; 42 events.forEach((event) => gtag('event', event.name, event.data)); 43})(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.