开发者

Log page visits with global.asax

I log usage on my site, by simply recording when a sessions starts and ends, and then posting it to a database, when it ends. But now, I am interested in abit more details开发者_开发百科. To be precise, I would like to know which pages, people visit. Can I do this in global.asax somehow? Should I make a handler instead? What I really want to avoid, is adding logging code, on all my pages.


Google Analytics is the best way here.

Also, you can use Global.asax BeginRequest event. Here you can find the HttpContext and probably url of the requested bage.

Also, as an option, you can use:

  • HttpModules

  • Base page for all of your pages, and hadle log data on Load event for example

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜