You can generate a page view with the following code:
$(document).ready(function() {
$(".tracking").click(function() {
ga('send','pageview','my-pdf-document')
});
});
You can actually pass even more data. See the official doc here: https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#send
ga('send', 'pageview', {
'page': '/my-pdf.pdf',
'title': 'My PDF Title'
});
UPDATE
You could definitely use your href dynamically like this
ga('send','pageview', $(this).attr('href'));
or even use some HTML-5, you can have your link like this:
<a href="/mypdf.pdf" class="tracking" data-title="mypdf-title">link</a>
and do
ga('send', 'pageview', {
'page': $(this).attr("href"),
'title': $(this).data("title")
});
EDIT 2
If you're still using ga.js, you can do it this way then:
_gaq.push(['_trackPageview', $(this).attr('href')]);