Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implement User Activity Tracking

I am working on an ASP.NET website with sql server 2008 R2. i need to implement a tracking system to track user activity as which pages the user browsed which item liked and so on i have a lot of options and tried couple of them

  1. i tried to send an insert with every page the user browses but it turned out a huge load on the sql server and after two days i removed it
  2. I had a solution is to buffer the users history in xml and flush them every 500 records in the database. it is working fine but it would be bad when users number increase
  3. I had found there is message queues like MSMQ and SQL Service Broker but i didnt go any further in this In the end i would like to hear your suggestions and recommendations as well as your comments for the MSMQ and SQL Service broker and if i should go for them and to which one of both and why
like image 440
Mina Zaki Avatar asked May 24 '26 10:05

Mina Zaki


1 Answers

You can try using a logging framework like log4net or nLog which gives you the flexibility to log to various targets and also use buffering / asynchronous logging to reduce the load.

like image 64
Scorpion-Prince Avatar answered May 26 '26 07:05

Scorpion-Prince



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!