I'm trying to build a hit counter for different parts of the website in ASP.NET MVC - any idea where the best place to do this would be, or a good way to do it? We're wanting to track how many hits individual parts of the website get.
+3
A:
If you are looking for website stats, I would use Google Analytics.
mlsteeves
2010-01-18 14:11:59
+5
A:
Depending on the granularity you want, here are some options:
- You can implement an ActionFilterAttribute that records the hit to some store.
- You can derive from DefaultControllerFactory and record the hit for each requested Controller.
Mark Seemann
2010-01-18 14:14:06