How can I track download statistics for private files? One of the most important metrics for the publications database I'm working on will be file downloads, looked at in various combinations with things like publication type, date published, etc.  With the system I'm migrating from, I parse the server logs with a python script, and then reconstructing information about publication type, etc. is time consuming or impossible.  Google analytics doesn't work because a lot of the file downloads come from direct requests to the file, not via the page itself.

My hope is that with drupal's private file system, the system should know about and be able to send to google analytics (or some other counter failing that), information about all file downloads in that private file system.  Ideally it would carry with it information on the node that the file is attached to, making it much easier to look at, for example, the number of journal article downloads for material published in FY2015.

I'm fairly new to drupal, and honestly I'm so tied up with other parts of the build that I haven't been able to do much to dig into this yet, beyond searching here and on google a number of times.  My searches so far have been fruitless, so I'm trying to find out whether I need to try to make sure enough detail is implicit in the file system to allow me to parse the log files better.

Can anyone help me figure out how counting file download statistics can be accomplished without relying on server logs?  I'm happy to explore modules, my initial thought was that the google analytics module might take care of that on its own, but I realized it still relies on someone clicking a link.

I should mention that I am using the media and file_entity module.
Give these modules a try
Download Count

The download_count module tracks downloads of private files attached
to nodes via the core upload or contributed filefield modules for d6
and private core file fields for d7.

File download count

An API for tracking file downloads. Recommended use is by using
file_entity's file/[file:fid]/download callback page. Basically the
difference between this and other file download tracking modules is
this module does not intend to track every single time the file is
viewed. It only wants to track when a file is actually triggered for
download. It is up to the site to implement links to the file download
URL.

AJAX Download Counter

This module uses AJAX to count file downloads. It's optimized for
medium to large sites (such as my own site, OpenGameArt.org) where the
total number of file downloads might be in the hundreds of thousands
or even millions. Using this module has some advantages and some
limitations versus other methods of counting downloads: