Tracking PDF Downloads in Google Analytics

Pageviews might not be all you care to measure using Google Analytics.  You may like to measure the number of times your documents and files (PDFs, AVI, WMV) are downloaded.  Google Analytics provides you with the capability to track clicks on file download links.  Because these links do not lead to a pageview on your site containing Google Analytics tracking code, you’ll need to tag the links with the _trackPageview() JavaScript to create a virtual pageview so that you can track these downloads.

For example, to log every click on a particular link to www.semseoexpert.com/files/tracking-downloads.pdf as a pageview for /downloads/tracking-downloads you would add the following attribute to the link’s tag:

< a href= ” http:// www. semseoexpert .com /files/tracking-downloads.pdf”>

< a href= ” http:// www. semseoexpert .com /files/tracking-downloads.pdf” onClick=”javascript: pageTracker._trackPageview(‘/downloads/tracking-downloads’); “>

You can create a virtual pageview to represent any kind of activity or interaction in your site.   All you need to do is to call _trackPageview() and provide a user friendly name.   This will create a virtual pageview in GA interface (in the Top Content and Content Drilldown reports) even though no new page has actually been loaded.

PDF Download Reporting in Google Analytics

Google Analytics Top Content Report - PDF Download

Since virtual pageviews appear along with standard pageviews in Google Analytics reports, you may wish to create a duplicate profile where you filter out the virtual pageviews.

Another point that is very important to consider is that even though virtual pageview is a great way for tracking PDF downloads, you should not use trackPageview JavaScript for tracking all kind of events (e.g., tracking menus) as it can potentially inflate your traffic reports in GA.

Web Analytics

Filed Under: Web Analytics

avatar

About the Author

Nima Asrar Haghighi is an Internet Marketing consultant with expertise in SEM (PPC Advertising), Organic SEO, RSS, Social Media and Web Analytics (Google Analytics IQ Certified). Nima holds an MBA in marketing, B.Eng. in Electrical Engineering, Project Management Certification, and CIW (Certified Internet Webmaster) in E-commerce. You can reach Nima at +Google Plus or LinkedIn.

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.