I set up some Event Tracking code on a website with JQuery, by using the example provide on this website.
here is the core part of the jquery code I am using :
var extension = (/[.]/.exec(href)) ? /[^.]+$/.exec(href) : undefined;
var filePath = href;
_gaq.push(['_trackEvent', 'Download', 'Click-' + extension, filePath]);
if (jQuery(this).attr('target') != undefined &&
jQuery(this).attr('target').toLowerCase() != '_blank') {
setTimeout(function() { location.href = baseHref + href; }, 200);
return false;
}
But what I don't want is to have "Click-"... displayed in Google Analytics. But after removing this, and the code becoming :
_gaq.push(['_trackEvent', 'Download', extension, filePath]);
no more events are being tracked in Google Analytics.