Timing a visit w/o objects in the global.asa

Results 1 to 2 of 2

Thread: Timing a visit w/o objects in the global.asa

  1. #1
    Join Date
    Dec 1969

    Default Timing a visit w/o objects in the global.asa

    Ok, I host my page on brinkster, and for security reasons they don&#039;t allow objects in the global.asa on risk of account termination. I&#039;ve made a small stat tracker program to log peoples&#039; IP, referer, date, time, and browser when they hit my site. My site is basically just a single page, so I put all the data gathering and recording code in an include file on my page and just set a session variable "recorded" to no and then "yes" after it was done to prevent someone from being recorded twice during the same session. <BR><BR>However, I&#039;d like to also record the length of the visit, but am not sure how to do this without putting a connection object in the session on end of the global.asa file.<BR><BR>My only thoughts are maybe I could grab where they were going as they&#039;re leaving my site and redirect them to a little page to record the visit length before sending them on their merry little way without them knowing, but I don&#039;t know how to do this if it&#039;s possible and it raises the question of, "What if they close the browser after viewing my site?"<BR><BR>Please help, and thank you in advance.

  2. #2
    Join Date
    Dec 1969

    Default What does global.asa have to do...

    ...with creating objects and making them Application variables?<BR><BR>Oh, that&#039;s often the easiest way to do it, but why can&#039;t you just do:<BR><BR>&#060;%<BR>Application.Lock<BR>If Not isObject(Application("MyLog")) Then<BR> Set Application("MyLog") = ...<BR>End If<BR>Application.Unlock<BR>%&#062;<BR><BR>???<BR> <BR>Having said all this...<BR><BR>*HOW* do you expect to record the length of the visit??? <BR><BR>If a user simply walks away from your site, then without a Session_OnEnd event handler in Global.asa, how will you know when they actually leave?<BR><BR>About the best you can do is record the time each user last hits any page. And since Session_onEnd is notoriously unreliable, that&#039;s probably better, anyway.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts