1 2var submitToGoogle = true; 3var LogEvent = function (category, action, label) { 4 if (submitToGoogle) { 5 ga('send', 'event', category, action, label); 6 window.setTimeout("", 100); 7 } 8 else { 9 if (window.console) { 10 console.log("Google disabled: Would have sent - _trackEvent," + category + ", " + action + ", " + label); 11 } 12 else { 13 alert("Google disabled: Would have sent - _trackEvent," + category + ", " + action + ", " + label); 14 } 15 } 16 17}; 18 19var AddGoogleTracking = function (element, category, action, details) { 20 $(element).on("click", function () { 21 LogEvent(category, action, details); 22 }); 23}
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.