ASP.NET Tracking Code & Unique Visitors

情到浓时终转凉″ 提交于 2019-11-29 08:00:49

There are a couple of good ways to try and determine unique visitors, none of them are exact (which is why different analytics will report different numbers).

The first is to use a cookie. Create a cookie for the user for each time frame that you want to track uniques, so you could create one that expires in a day and one that expires in a month. You can then use both of those to track how many unique daily/monthly visitors you have. Of course this is not perfect since people can clear or refuse cookies, but it is pretty accurate.

The other way is to track uniques using a combination of the IP address and User Agent of the requesting user, this is probably slightly less accurate since if a company has a good IT group lots of internal users will have the same User Agent and since they are all coming from the same internal network could have the same IP address.

If you are interested in reading more about the different methods there is a great article about it here: http://www.google.com/support/urchin45/bin/answer.py?answer=28325

ilker Aksu
Micah

I would recommend using google analytics instead of reinventing the wheel. All you have to do is stick a bit of javascript in your master page and your done.

Yo can check Piwik out. Its an open source web analytics written using PHP and mysql.

you can find great article in
http://www.codeproject.com/KB/aspnet/PageTracking.aspx
which is upgraded version of
http://www.15seconds.com/Issue/021119.htm

with help of a Session Tracker class that runs in Application_PreRequestHandlerExecute and mailing reports on session end and lot of usefull tips

thanks Wayne Plourde for all that stuff

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!