I'm going to add another answer here too. Based on the Google Analytics documentation for their iOS and Android SDN, it's possible to send traffic events from non-webpages. Some people have figured out how to use this API to send traffic directly from your server-side server-side application code, so now you can use the Google Analytics API to send traffic events manually from your download handler. Here's a link to the relevant libraries depending on your framework of choice:
- (PHP) php-ga: http://code.google.com/p/php-ga/
- (.NET) google-gdata: http://code.google.com/p/google-gdata/
Update: The Google Analytics Measurement Protocol Developer Guide has instructions for issuing your own REST-style API calls to track whatever data you wish. This can include things like file downloads, calls to an API endpoint, or anything else.