Well I have to say that I was quite pleased to see that this is now handled out of the box on Sitecore 8. This is done through Media Assets. You can find more about it in the following link: https://doc.sitecore.net/sitecore%20experience%20platform/marketing%20taxonomies/classify%20a%20media%20item%20as%20a%20digital%20marketing%20asset
So what do you need to do:
1- Open your Marketing Control Panel and add a New Taxonomy Asset Item:
2- Deploy your Media Asset folder:
3- You can now use your Media Asset on your Media Item directly:
4- Now the only thing left to do is to setup the Event tracking on your media item:
5- setting up the event on the media item, means that everytime someone will request the media item, sitecore will track the Media Assets with the corresponding event: Download. The event already exist in sitecore and is already hooked to the Marketing report:
There you go you are now tracking the Media requests.
Just a quick look at the magic behind, if you quickly uncompile the Sitecore DLL, look for the MediaRequestHandler class that processes '~/media' requests raise 'media:request' event.
Analytics defined in 'Sitecore.Analytics.RobotDetection.Media.MediaRequestHandler' handler that is supposed to do processing will checks:
- If Analytics is enabled for the site
- If requested item has some data in a tracking field
- Launches 'Tracker.StartTracking()' API which would initialize tracker ( 'startAnalytics' pipeline )