var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-2018737-1']); _gaq.push(['_trackPageview']); if (typeof jQuery == 'function'){ (function($) { if (!$) return; $("a[href$='.pdf']").each(function() { var $a = $(this); var href = $a.attr('href'); $a.click(function() { gaq.push(['_trackPageview', 'href']); }); }); })(jQuery); }