One of the ASP.NET forums member asked a query regarding tracking detailed user browser activity, for e.g. logging events like pressing Back/Forward buttons, bookmarking a page etc.
Since these activites happen purely on client side, JavaScript code can be one solution. I found a nice paper on the same which might be of help:
http://www2006.org/programme/files/xhtml/17/xhtml/fp17-atterer.html
But before following any approach, I think we must first analyze the requirements again and do a re-check if such kind of tracking is really worth. Mostly people start looking for implementation solutions too quickly rather than thinking over the requirements again which might lead us to a completely different approach (and easier solution).