What’s the best way to track file downloads in Google Analytics? Will the Digital Analytics Program (DAP) help me track PDF/.doc/.xls downloads? Are my download numbers accurate? Why aren’t my file downloads appearing in the web analytics data?
The answers to these questions aren’t abundantly clear to even seasoned web analysts. But here’s the good news: If your site uses DAP, we’ve done the hard work, and our code records file downloads on your web pages by default! That said, sometimes people come to us and say “I KNOW my PDF file has been viewed a lot, but the analytics don’t say that.”
(We’ll use PDF as the example from now on, but everything said applies to all file extensions like .doc, .xls, etc.)
One reason might be that you’re sharing links directly to your PDF through your communications channels, social media, email, or promotional partners. If that is the case, the direct link that you’re sharing is exactly where the problem lies. Analytics tools can only record data for file downloads if a link to the file is clicked on a web page.
Right-clicking on a web page allows you to view the html page source code. However, you can’t do this with a PDF document. Try it yourself with this sample PDF.
You can’t actually place analytics tracking code behind a PDF document, so the analytics tool has no way of knowing when someone views the PDF from a direct URL. The code on a web page watches for a link click to a specified file, and records that as a “download.”
There are two possible solutions to obtain the data tracking the total number of times your PDF document has been viewed.
The first is to access the server log files, which maintains a list of all activities your server has performed. This includes the total number of times your online PDF document has been accessed (both by direct URL or by link click on a web page). Beware, you may have to jump through some hoops to obtain access to the log files if you don’t already have it.
The second option, and perhaps the more simple option, is to share the web page URL with a link to the PDF on it. You can implement a web analytics solution, such as DAP, on that web page. Google Analytics can then track the number of times users access your PDF from that web page based on link clicks.
Since Google Analytics will only track PDF downloads from the web page, the numbers will differ from those in your server logs. Remember, server logs will track access to your PDF from both a link on one of your web pages and direct links from external sources or channels.
For more information about how DAP can help you track PDF downloads or downloads of other extensions, please email DAP.Edit