function trackDownload(link) {
var fileName = link.getAttribute('href');
fileName = fileName.split('/').pop();
// Track event in GA
_gaq.push(['_trackEvent', 'Download', 'Resources Download', fileName]);
}
<a href="some-file.pdf" onClick="trackDownload(this)">Some File</a>