I have a web application which lets users download files. I dynamically generate the a `href="xx"` links.

I've already seen this article explaining how to track routes with Angular: <http://www.arnaldocapo.com/blog/post/google-analytics-and-angularjs-with-ui-router/72>

How can I also track each file downloaded by the users?