Attaching to all attr pdf’s
$( document ).ready(function() {
//attach event dispatcher to all links that are pdf files
//register event in analtyics
$('a[href*=".pdf"]').click(function(e) {
ga('send', 'event', 'PDF', 'download', $(this).attr('href'), 1);
});
});