Mina Zaki
Mina Zaki

Reputation: 160

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

Upvotes: 3

Views: 1244

Answers (2)

Erik Funkenbusch
Erik Funkenbusch

Reputation: 93424

I would use something like Google analytics. It's easy, you just put the boilerplate code into your pages, and google does the rest.

Upvotes: 1

Scorpion-Prince
Scorpion-Prince

Reputation: 3634

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.

Upvotes: 1

Related Questions