Possible Duplicate:
How to track clicks on outbound links
As described in the official documentation I have included this piece of code in my <head>
section:
<script type="text/javascript">
function recordOutboundLink(link, category, action) {
try {
var myTracker=_gat._getTrackerByName();
_gaq.push(['myTracker._trackEvent', category , action ]);
setTimeout('document.location = "' + link.href + '"', 100)
}catch(err){}
}
</script>
And have changed the link to this:
<a href="http://www.example.com" onClick="recordOutboundLink(this, 'Outbound Links', 'example.com');return false;">
However still no events are shown up in the reports.
What am I doing wrong?