How do you define a "page"? I consider a "page" the thing rendered when a user visits a URL. Since access rules trigger on any URL visitation, this means you can write a log of "pages" visited via an access rule. But it seems you are defining "page" in a different way; what defines a "page" to you? Do you want to track all calls to other Zope objects inside a Zope object? This is very difficult and probably not worth it. The logs generated would be huge and would have pointless amounts of detail, most of which you probably wouldn't care about. ----- Original Message ----- From: "Dennis Allison" <allison@sumeru.stanford.EDU> To: <allison@sumeru.stanford.EDU>; <evan@4-am.com>; <zope@zope.org> Sent: Thursday, September 19, 2002 11:44 AM Subject: [Zope] Re: Access Rules
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.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )