jQuery(document).ready(function(){ jQuery("a[href^='mailto:']").click(function(){ if (_gaq) { var mAddress = jQuery(this).attr('href').replace('mailto:', ''); _gaq.push(['_trackEvent', 'MailTo', 'click', mAddress]); } }); jQuery("a[href*='.doc'],a[href*='.docx'],a[href*='.dwg'],a[href*='.cad'],a[href*='.pdf'],a[href*='.xls'],a[href*='.xlsx'],a[href*='.ppt'],a[href*='.pptx'],a[href*='.zip'],a[href*='.txt'],a[href*='.vsd'],a[href*='.vxd'],a[href*='.js'],a[href*='.css'],a[href*='.rar'],a[href*='.exe'],a[href*='.wma'],a[href*='.mov'],a[href*='.avi'],a[href*='.wmv'],a[href*='.mp3']").click(function(e){ if (_gaq) { _gaq.push(['_trackEvent', 'Download', 'click', jQuery(this).attr('href')]); } }); jQuery("a[href*='http']:not([href*='" + window.location.hostname + "'])").click(function(e){ if (_gaq) { _gaq.push(['_trackEvent', 'Outbound', 'click', jQuery(this).attr('href')]); } }); });