1const dl = drupalSettings.gtm.settings.data_layer || 'dataLayer' 2window[dl] = window[dl] || []; 3 4(function (drupalSettings) { 5 const config = drupalSettings.gtm; 6 7 window[dl].push({'gtm.start': new Date().getTime(), event:'gtm.js'}); 8 const gtmSettings = config.settings; 9 if (gtmSettings.include_classes === true) { 10 window[dl].push({ 11 'gtm.allowlist': gtmSettings.allowlist_classes ?? [], 12 'gtm.blocklist': gtmSettings.blocklist_classes ?? [], 13 }); 14 } 15 config.tagIds.forEach(function(tagId) { 16 const script = document.createElement('script') 17 script.async = true; 18 const dLink = dl!='dataLayer'?'&l='+dl:''; 19 script.src = 'https://www.googletagmanager.com/gtm.js?id=' + tagId + dLink; 20 script.type = 'text/javascript' 21 document.getElementsByTagName('head')[0].appendChild(script); 22 }); 23})(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.