views:

819

answers:

5

Hi Guys,

I am trying to find a way to track and produce reports for my site (out of interest). Does anyone know of any articles/projects etc that you can

  1. Track pages / unique visitors etc
  2. Tracking 1) relative to timestamp etc

in asp.net mvc or just asp.net ?

P.S - I know google analytics etc is available but looking to create some basic stats for myself out of interest about how web analytics work ?

A: 

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.

Micah
Yeah yeah Micah - thanks but sort of looking to learn this myself ? i.e. out of interest :)
A: 

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

Shoban
+3  A: 

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

James Avery
+1  A: 

I blogged about simple asp.net module.

You can check it here
http://www.ilkeraksu.com/post/2009/07/14/Very-very-simple-But-very-very-efficient-Aspnet-Tracking-module.aspx

ilker Aksu
A: 

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

imanabidi