Counting downloads

I have the following HAML code:

%a{‘id’ => download_file_a, ‘href’ => ‘/doc/marketing/ultradedup.zip’}

What is the best way to detect (on the rails server) that the user
clicked on the link for this download? Javascript sending some event to
the server?