Difference between revisions of "Template:Gatracker"
From Documentation
(Created page with "$(function () { function handleOutboundLinkClicks(event) { ga('send', 'event', { eventCategory: 'Outbound Link', eventAction: 'click', eventLabel: event.targe...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
$(function () { | $(function () { | ||
− | + | function handleWikiClicks(event) { | |
− | function | ||
ga('send', 'event', { | ga('send', 'event', { | ||
eventCategory: 'Outbound Link', | eventCategory: 'Outbound Link', | ||
Line 8: | Line 7: | ||
}); | }); | ||
} | } | ||
− | + | $('.galink').each(function(each){each.find('a').click(function(event){handleWikiClicks(event)}); | |
}()); | }()); |
Latest revision as of 07:11, 31 May 2018
$(function () {
function handleWikiClicks(event) { ga('send', 'event', { eventCategory: 'Outbound Link', eventAction: 'click', eventLabel: event.target.href }); } $('.galink').each(function(each){each.find('a').click(function(event){handleWikiClicks(event)});
}());