1if (typeof googleAnalyticsId == 'string') { 2 window.dataLayer = window.dataLayer || []; 3 function gtag(){dataLayer.push(arguments);} 4 gtag('js', new Date()); 5 6 if (googleAnalyticsUser != '') { 7 gtag('config', googleAnalyticsId, {user_id: googleAnalyticsUser}); 8 } else { 9 gtag('config', googleAnalyticsId); 10 } 11} 12 13function trackEvent(trackOpts, eventId) { 14 if (typeof trackOpts == 'object' && typeof gtag == 'function') { 15 if (trackOpts.data) { 16 gtag(trackOpts.type, trackOpts.action, trackOpts.data); 17 } else { 18 gtag(trackOpts.type, trackOpts.action, {'event_category': trackOpts.category, 'event_label': trackOpts.value}); 19 } 20 } 21}
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.