logging website visits, how??

Discussion in 'ASP .Net' started by Jeff, Mar 14, 2007.

  1. Jeff

    Jeff Guest

    ASP.NET 2.0

    In my webproject I want to implement some kind of functionality which logs
    the vistits to the website. I want it to log what pages the user requested,
    when he arrived at the website (session_start), when he leave the website
    (session_end).. if some exception occur then that should be logged also

    I'm thinking about using the health monitoring system for logging
    exceptions. For site visits I'm thinking of putting some code in for example
    Page_Load event and when the page is opened then a table in the database is
    updated.

    Is this a good approach?? any suggestions?? anyone got a link to a great
    article showing best practice doing this (I've been googling and cannot find
    a good article about the subject)??

    Jeff
    Jeff, Mar 14, 2007
    #1
    1. Advertising

  2. Jeff,
    I'm not sure if you can do what you want on the session_end. Mostly
    that's for cleanup and, if I remember correctly from previous experience
    with session_end events in IIS and ASP, you're not allowed to create certain
    objects such as database connections since you're meant to be destroying
    them. Session_End may not give you much info though as it's pretty much not
    representative of when the user left as it's fired when there's a 20 minute
    inactivity period or the application decides to correct itself.

    Have you thought of, instead of trying to capture all of this
    information yourself (which will require a performance hit as you have to
    output everything to somewhere), of just building some sort of live parser
    for your web server logs? IIS already keeps track of all this information,
    and does it very efficiently. You could just parse through this data,
    perhaps storing it into a db for access later or for performing tasks such
    as reverse IP lookups for dns resolution. This would still be a decent task,
    but it's only have the problem as you would already have the information
    gathering system, you would just need the report viewer for the web logs.

    --
    Hope this helps,
    Mark Fitzpatrick
    Former Microsoft FrontPage MVP 199?-2006

    "Jeff" <> wrote in message
    news:...
    > ASP.NET 2.0
    >
    > In my webproject I want to implement some kind of functionality which logs
    > the vistits to the website. I want it to log what pages the user
    > requested, when he arrived at the website (session_start), when he leave
    > the website (session_end).. if some exception occur then that should be
    > logged also
    >
    > I'm thinking about using the health monitoring system for logging
    > exceptions. For site visits I'm thinking of putting some code in for
    > example Page_Load event and when the page is opened then a table in the
    > database is updated.
    >
    > Is this a good approach?? any suggestions?? anyone got a link to a great
    > article showing best practice doing this (I've been googling and cannot
    > find a good article about the subject)??
    >
    > Jeff
    >
    Mark Fitzpatrick, Mar 14, 2007
    #2
    1. Advertising

  3. Dont do it, theres a million tools available that can do 95% of what you
    need already and for the remainder its not worth the investment in
    development time for the return you get. This is a superb option for
    free.....

    http://awstats.sourceforge.net/docs/awstats_faq.html

    Regards

    John Timney (MVP)
    http://www.johntimney.com
    http://www.johntimney.com/blog


    "Jeff" <> wrote in message
    news:...
    > ASP.NET 2.0
    >
    > In my webproject I want to implement some kind of functionality which logs
    > the vistits to the website. I want it to log what pages the user
    > requested, when he arrived at the website (session_start), when he leave
    > the website (session_end).. if some exception occur then that should be
    > logged also
    >
    > I'm thinking about using the health monitoring system for logging
    > exceptions. For site visits I'm thinking of putting some code in for
    > example Page_Load event and when the page is opened then a table in the
    > database is updated.
    >
    > Is this a good approach?? any suggestions?? anyone got a link to a great
    > article showing best practice doing this (I've been googling and cannot
    > find a good article about the subject)??
    >
    > Jeff
    >
    John Timney \(MVP\), Mar 14, 2007
    #3
  4. On Mar 14, 9:36 pm, "Jeff" <> wrote:

    > Is this a good approach?? any suggestions?? anyone got a link to a great
    > article showing best practice doing this (I've been googling and cannot find
    > a good article about the subject)??
    >


    What about using a third-party logs?

    E.g. http://www.google.com/analytics/

    It logs entrances, exits and many other things.
    Alexey Smirnov, Mar 14, 2007
    #4
  5. On Mar 14, 11:15 pm, "Alexey Smirnov" <>
    wrote:
    > On Mar 14, 9:36 pm, "Jeff" <> wrote:
    >
    > > Is this a good approach?? any suggestions?? anyone got a link to a great
    > > article showing best practice doing this (I've been googling and cannot find
    > > a good article about the subject)??

    >
    > What about using a third-party logs?
    >
    > E.g.http://www.google.com/analytics/
    >
    > It logs entrances, exits and many other things.


    AWstats is also nice (however, it required a Perl)
    Alexey Smirnov, Mar 14, 2007
    #5
  6. Jeff

    Bob Johnson Guest

    My strong recommendation is to go with AlterWind Log Analyzer Pro:

    http://www.alterwind.com/

    Unlike AWStats, AlterWind does not require Perl or any other such nonsense.

    -HTH



    "Jeff" <> wrote in message
    news:...
    > ASP.NET 2.0
    >
    > In my webproject I want to implement some kind of functionality which logs
    > the vistits to the website. I want it to log what pages the user
    > requested, when he arrived at the website (session_start), when he leave
    > the website (session_end).. if some exception occur then that should be
    > logged also
    >
    > I'm thinking about using the health monitoring system for logging
    > exceptions. For site visits I'm thinking of putting some code in for
    > example Page_Load event and when the page is opened then a table in the
    > database is updated.
    >
    > Is this a good approach?? any suggestions?? anyone got a link to a great
    > article showing best practice doing this (I've been googling and cannot
    > find a good article about the subject)??
    >
    > Jeff
    >
    Bob Johnson, Mar 15, 2007
    #6
  7. SmarterStats is a good no-nonsense choice, too...and it has a free version :

    http://www.smartertools.com/Products/SmarterStats/Free.aspx




    Juan T. Llibre, asp.net MVP
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ===================================
    "Bob Johnson" <> wrote in message news:eu$...
    > My strong recommendation is to go with AlterWind Log Analyzer Pro:
    >
    > http://www.alterwind.com/
    >
    > Unlike AWStats, AlterWind does not require Perl or any other such nonsense.
    >
    > -HTH




    > "Jeff" <> wrote in message
    > news:...
    >> ASP.NET 2.0
    >>
    >> In my webproject I want to implement some kind of functionality which logs the vistits to the
    >> website. I want it to log what pages the user requested, when he arrived at the website
    >> (session_start), when he leave the website (session_end).. if some exception occur then that
    >> should be logged also
    >>
    >> I'm thinking about using the health monitoring system for logging exceptions. For site visits I'm
    >> thinking of putting some code in for example Page_Load event and when the page is opened then a
    >> table in the database is updated.
    >>
    >> Is this a good approach?? any suggestions?? anyone got a link to a great article showing best
    >> practice doing this (I've been googling and cannot find a good article about the subject)??
    >>
    >> Jeff
    >>

    >
    >
    Juan T. Llibre, Mar 15, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alberto

    count visits

    Alberto, Oct 30, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    562
    Scott M.
    Oct 30, 2003
  2. K.
    Replies:
    4
    Views:
    359
  3. fulio pen
    Replies:
    9
    Views:
    451
    William Gill
    Sep 28, 2007
  4. Steve

    Page Visits

    Steve, Nov 13, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    392
    Hillbilly
    Nov 14, 2008
  5. Trans
    Replies:
    4
    Views:
    80
    Trans
    Jan 29, 2005
Loading...

Share This Page