I am need to write some code that tracks the users actions and writes them to a text file which will then be sent to a database. Such as what buttons they click on, what they drag and drop and other events. This way we know how to make the software better in the future. Has anyone done anything like this or know where I can find some information on the best way to go about this? I can't seem to find any examples of anyone doing this. Thanks.