[Zope] Re: Access Rules

Dennis Allison allison@sumeru.stanford.EDU
Thu, 19 Sep 2002 08:44:43 -0700


Evan Simpson <evan@4-am.com> wrote:
> 
> Dennis Allison wrote:
> > Access rules use the before_traverse hook.  When does that hook
> > get invoked?
> 
> Just prior to the next step in a *Publishing* path.  The hook is not 
> triggered by any other sort of access, including DTML, Script, and 
> Template traversal.  Only an incoming request URL triggers Access Rules.
> 
which explains the observed result which prompted the posting.  Thanks 
Evan.

I need to log of the amount of time each user spends on each page.

My iniitial approach (suggested by someone on the list) was to use a
Site Access Rule to capture and inspect PATH_INFO and use that to log
page arrivals and departures.  iTo experiment, I used a single Site
Access Rule located at the root of the page structure I want to gather
usage information about and simply logged the PATH_INFO corresponding
to every traversal.  This particular approach doesn't work, since not
all the navigation triggers the access rule and, so, the information
needed to compute user behavior did not get logged.

Any suggestions for another approach?  What I eventually want to be able
to construct is a report of the form:

   user   web-page   arrival-time  departure-time

Departure time is inferred from an arrival on another page.