I sat through Richard Atterer's talk on User Activity Tracking for Website Usability Evaluation and Implicit Interaction. (See the paper.)
The problem is that putting code on the client to track user actions is invasive and users aren't likely to put up with it. On the other hand, putting the code on the server misses JavaScript actions that don't result in server requests.
Their answer was to use a rewriting proxy called UsaProxy that rewrites any page you request to make sure their tracking JavaScript is included. Very clever and related to some other things I've seen for modifying sites temporarily.