in reply to Tracking user exits

It sounds like you want to see who is still active on the site. A piece of the solution could be tracking when people leave the site via an outbound link. You can track people leaving via an outbound link by rewriting every link off the site: replace
     <a href="http://www.yahoo.com">
with a
     <a href="/cgi-bin/sendto.pl?id=4041">
sort of thing, where 4041 maps to Yahoo. Then the sendto script can log the user, the time, and where they departed to. (This strategy is how the portals -- MSN, AOL, etc -- track the traffic they send to their advertising sites.) You could do these rewrites statically (embed sendto links in your static or dynamic pages), or I suppose you could do them on-the-fly with a mod-perl filter.

If the person leaves your site by just turning off their computer, by typing a new URL into the browser, or using their favorites, you wont be able to see it with this approach. So this doesn't completely solve your "who is still active" question, but I thought I'd toss out the idea.

Replies are listed 'Best First'.
RE: Re: Tracking user exits
by merlyn (Sage) on Sep 06, 2000 at 18:33 UTC
    I've discussed a CGI exit script in my WebTechniques Perl column, including why it is necessary, and how to set up the site for it.

    Oddly enough, I also use my CGI "exit" script to track links I place on slashdot and other public arenas to see if anyone follows them. For example, on slashdot, I may code in a story like:

    For more information about my legal case, visit <a href="http://www.stonehenge.com/cgi/go/http://www.lightlink.com/for +s/">the friends of randal schwartz website</a>.
    which then shows up as a link like:
    For more information about my legal case, visit the friends of randal schwartz website.
    And clicking on that link (try it) takes you to www.lightlink.com/fors/, while first noting it on my server, so I can see if this link I've so carefully typed was of interest to anyone, or if I was just wasting my breath. Obviously, I don't need to code inward links to my site this way... only links from a public site to some other public site. It's a nice way of knowing if I'm just babbling. {grin}

    -- Randal L. Schwartz, Perl hacker