1window.googletag = window.googletag || {cmd: []}; 2googletag.cmd.push(function() { 3 //dataLayer_content is provided by the GTM4WP plugin; this script is loaded after dataLayer_content is init'd 4 //via a hook in the GTM4WP plugin 5 let pageType = dataLayer_content.pagePostType; 6 let pageTitle = dataLayer_content.pageTitle; 7 8 let pageCategories = dataLayer_content.pageCategory; 9 if (!pageCategories) { 10 pageCategories = []; 11 } else if (typeof pageCategories === 'string') { 12 pageCategories = [pageCategories]; 13 } 14 15 let pageTags = dataLayer_content.pageAttributes; 16 if (!pageTags) { 17 pageTags = []; 18 } else if (typeof pageTags === 'string') { 19 pageTags = [pageTags]; 20 } 21 22 let olyticsPayload = { 23 "behaviorId": aiAdMgmtOlytics.behaviorId, 24 "Application": aiAdMgmtOlytics.applicationId, 25 "Technology": 'wordpress', 26 "Content_Type": pageType, 27 "Page_Title": pageTitle 28 }; 29 30 if (pageCategories && pageCategories.length) { 31 olyticsPayload.category = pageCategories.join(','); 32 } 33 34 if (pageTags && pageTags.length) { 35 olyticsPayload.tag = pageTags.join(','); 36 } 37 38 console.log('AI Ad Mgmt - Olytics page tracking: sending payload: ', olyticsPayload); 39 40 olytics.fire(olyticsPayload); 41}); 42
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.