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 const hostname = (config.hostname || 'www.googletagmanager.com'); 27 script.src = `https://${hostname}/gtag/js?id=${config.tagId}`; 28 script.type = 'text/javascript'; 29 document.getElementsByTagName('head')[0].appendChild(script); 30 } 31 32 const additionalConfigInfo = config.additionalConfigInfo || []; 33 if (additionalConfigInfo.length === 0) { 34 gtag('config', config.tagId); 35 } else { 36 gtag('config', config.tagId, additionalConfigInfo); 37 } 38 39 const otherIds = config.otherIds || []; 40 otherIds.forEach((id) => gtag('config', id)); 41 42 const events = config.events || []; 43 events.forEach((event) => gtag('event', event.name, event.data)); 44})(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.