开发者

HitCounter in MVC

I'm trying to build a hit counter for different parts of the website in 开发者_如何学CASP.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.


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.


If you are looking for website stats, I would use Google Analytics.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜