For a research project, I need to do detailed tracking of individual user behavior, something on the order of the Z2.log file, but tied to a particular user's session. Basically I want to log the time of arrival and departure of each user on each "page" of the system. Anyone else tried this in the context of Zope?
You could use an External Method as an Access Rule which writes the session id, URL, and time of each page request out to a logfile. (It's best to use the getId() method of a session object to get the session id.) Then write an analysis tool which computed what you wanted to know about that data. ----- Original Message ----- From: "Dennis Allison" <allison@sumeru.stanford.EDU> To: <zope@zope.org> Sent: Wednesday, July 17, 2002 8:08 PM Subject: [Zope] Tracking Users in Zope
For a research project, I need to do detailed tracking of individual user behavior, something on the order of the Z2.log file, but tied to a particular user's session. Basically I want to log the time of arrival and departure of each user on each "page" of the system. Anyone else tried this in the context of Zope?
_______________________________________________ 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 )
Chris McDonough wrote:
You could use an External Method as an Access Rule which writes the session id, URL, and time of each page request out to a logfile.
Can you explain what you mean by "use an External Method as an Access Rule"? Regarding the analysis of resulting data I would leverage existing analysis tools. If you make the External method write the log data in 'combined Apache http log format' you will be able to use wusage (it's shareware) which does what you want. Is there a free http log analysis tool which can do user behaviour tracking? -- Milos Prudek
Chris McDonough wrote:
You could use an External Method as an Access Rule which writes the session id, URL, and time of each page request out to a logfile.
Can you explain what you mean by "use an External Method as an Access Rule"?
You can take a peek at http://saints.homeunix.com:8081/ZopeBook/ZopeServices.stx under "Access Rule Services" to understand a bit more about access rules. (In case you're wondering, this is the "development" version of the Zope Book on my home machine and it may not be up all the time). Create an external method like so: def accessrule(self, container, request, logfile='/some/file/name'): log = open(logfile, 'a') session = self.session_data_manager.getSessionData() session_id = session.getId() ... find out everything else you need to write out to the log here using the request and whatnot, then write to the logfile... log.write([whatever you want to write to the logfile]) log.close() ... then set it as an access rule in the folder where you want to track user behavior ... then write a script to analyze the logfiles it produces.
Regarding the analysis of resulting data I would leverage existing analysis tools. If you make the External method write the log data
in
'combined Apache http log format' you will be able to use wusage (it's shareware) which does what you want.
Really? It analyzes traffic patterns with session ids in them? I didn't think the combined format had a "slot" for session ids. I think it definitely needs to be custom.
Is there a free http log analysis tool which can do user behaviour
tracking? There may be something along with mod_usertrack in Apache, I'm not sure. - C
Chris McDonough wrote:
Regarding the analysis of resulting data I would leverage existing analysis tools. If you make the External method write the log data
in
'combined Apache http log format' you will be able to use wusage
(it's
shareware) which does what you want.
Really? It analyzes traffic patterns with session ids in them? I didn't think the combined format had a "slot" for session ids. I think it definitely needs to be custom.
Is there a free http log analysis tool which can do user behaviour
tracking?
There may be something along with mod_usertrack in Apache, I'm not sure.
wusage indeed does use a custom format if you want usertracking, the last column gets the unique cookie value. And it indeed uses mod_usertrack of apache. I think a good and simple solution would be to use apache as a frontend and indeed let mod_usertrack do the work. Write the cookie value into apaches logfiles (this is simple with a custom log) and analyse that. I guess in this case the analysis itself might be the real work, so why bother with the NIH syndrom. cheers, oliver
participants (4)
-
Chris McDonough -
Dennis Allison -
Milos Prudek -
Oliver Bleutgen