I ran into the same problem with the target="_blank" not working when adding code for tracking file downloads.
on this website, the "Automate It" section shows a jquery code that will detect different type of links on your website (files, mailto, etc...) and automatically add the "onclick" event with _gaq.push.
in case the link above doesn't work : http://www.blastam.com/blog/index.php/2011/04/how-to-track-downloads-in-google-analytics/
_link
will replace your current page with the link page. So you should always return false because Google Analytics will be in charge of the redirection for this link.
Also Google doesn't support the attribute _blank. So you have to find a way around.
_gaq.push(['_setAllowLinker', true]);
function _gaLink(a) {
url = a.href
_gaq.push(function() {
if (a.target == '_blank') {
window.open(_gat._getTrackers()[0]._getLinkerUrl(url));
} else {
_gaq.push(['_link', url]);
}
});
return false;
}
Now you can call it instead of Google Analytics _link.
<a href="http://example.com/test.html"
onclick="return _gaLink(this);"
class="noFloat"
target="_blank">
Click Me
</a>