1/** 2* Function that tracks a click on an outbound link in Google Analytics. 3* This function takes a valid URL string as an argument, and uses that URL string 4* as the event label. 5*/ 6var trackOutboundLink = function(url) { 7 ga('send', 'event', 'Outbound', 'click', url, {'hitCallback': 8 function () { 9 console.log("Tracked outbound link: " + url); 10 } 11 }); 12}; 13/** 14* Same as above, but tracking social clicks instead. Doesn't track actual shares, 15* only tracks the click to initiate a share. This will be used for FB, Twitter, 16* Pinterest, email, link share and whatever else you want to track. 17*/ 18var trackShareLink = function(type, url) { 19 ga('send', 'event', 'Social', type, url, {'hitCallback': 20 function () { 21 console.log("Tracked social link: " + url); 22 } 23 }); 24}; 25/** 26* Same as above, but tracking marker clicks instead. Should track every marker 27* click site-wide. 28*/ 29var trackMarkerClick = function(url) { 30 ga('send', 'event', 'Markers', 'click', url, {'hitCallback': 31 function () { 32 console.log("Tracked marker click for " + url); 33 } 34 }); 35};
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.