Forum OpenACS Development: Visitor tracking

Collapse
Posted by Malte Sussdorff on
How can I check if a visitor to my site has been there within the last 10 minutes. I'm explicitly talking about visitors and not users.

Reason: I have the small banner from http://www.explorerdestroyer.com which I use in my blank-master. Sadly this will display it continously on every single page, but I only want to make a reminder to the user every time he visits the site on the first page, but not on any others. That's why I asked for the 10 minutes. If he has been to the site in the last 10 minutes, don't bother, otherwise display it.

Collapse
2: Re: Visitor tracking (response to 1)
Posted by Gustaf Neumann on
Malte,

the xotcl request monitor can do this for you. You can issue from a connection thread eg. throttleThread do Users hits 494 to obtain the number of hits for the user 494 in the last 10minutes. If the user arrived newly, your get 0.

You can also get the same way the last peer address, or the list of the last requests of this user. It is quite fast, it takes around 100 microseconds per call on my notebook and half the time on our server with currently 500 users logged in.

The current version is http://media.wu-wien.ac.at/download/xotcl-request-monitor-0.27.apm

see also: https://openacs.org/forums/message-view?message%5fid=335571