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 functionality_storage: 'denied', 20 personalization_storage: 'denied', 21 security_storage: 'denied', 22 wait_for_update: 500, 23 }); 24 } 25 26 if (config.tagId.length !== 0) { 27 const script = document.createElement('script'); 28 script.async = true; 29 script.src = `https://www.googletagmanager.com/gtag/js?id=${config.tagId}`; 30 script.type = 'text/javascript'; 31 document.getElementsByTagName('head')[0].appendChild(script); 32 } 33 34 const additionalConfigInfo = config.additionalConfigInfo || []; 35 if (additionalConfigInfo.length === 0) { 36 gtag('config', config.tagId); 37 } else { 38 gtag('config', config.tagId, additionalConfigInfo); 39 } 40 41 const otherIds = config.otherIds || []; 42 otherIds.forEach((id) => gtag('config', id)); 43 44 const events = config.events || []; 45 events.forEach((event) => gtag('event', event.name, event.data)); 46})(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.