In case you just want to track the pages a user visits along with query strings etc, you can use a
http handler
. Refer to this link for a short introduction -
http://support.microsoft.com/kb/308001[
^]. There is a lot more information on the net pertaining to http handlers, have a look at them. If you want to track every particular mouse click, it is going to be really hard on the database and the server. So, I would recommend just logging the pages and the query strings.
If you insist on storing every activity in a page, you may have provide a utility class with a method, that gets called from every method call to log information you need. But this definitely is not a good idea!
Hope this helps!