Forum OpenACS Q&A: Monitoring user activity

Collapse
Posted by Alex Schenkman on
Hi,

Is there any package that monitors and give reports on user activity?

I'm using dotLRN-1.0 and I'd need to know when they download a file, for exmple.
Or when and for how long they are loged in.

I know I might be able to get this info from the log files, but I wonder if there is already someone who has done it.

I know I can get notifications on surveys.

Thank you.

Collapse
Posted by Caroline Meeks on
dotLRN does not have this functionality out of the box yet. I'm also interested in user tracking for an OACS site I'm working on.

What are people's ideas on the best way to implement this for both dotLRN and OACS?

Collapse
Posted by Don Baccus on
Anything that can be done by analyzing log files is probably done better in that way than in adding customized database inserts to track the data.  For one thing there's a lot of flexibility in this approach, on the other they can be analyzed offline on another machine rather than bog down your production server.  I know Greenpeace has some experience with a relatively low-cost proprietary log analyzer that seems to work quite well.  I don't know of any equivalent in the open source space.

Of course some stuff's already inherently trackable by stuff already in the database, for instance object creation by user can be analyzed using existing metadata.

Collapse
Posted by Peter Alberer on

I think it depends on what you want to do with the statistical data. If you just want to know what your users are doing and what pages they are accessing, then the external log analyzer is probably the best option.

But there are some cases where you want to use the statistical data to show "top SOMETHING" lists or the like. In that i can think of several options:

  • if it is not important to have up-to-date statistics, the log file and external analyzers might suffice. (if its possibly to feed back its output to your system.)

  • otherwise you could create a detailed general logging table with columns for every event:
    event_id, user_id, timestamp, event_type, (and various context info)
    inserting into the table wont be a problem but if you want to ask complex questions like "find every user that has downloaded a file from the same category X user Y just visited and try to find out the top Z they downloaded" performance will be very bad.

    in adddition this table will probably grow very fast and therefor you will need to aggregate it. i am not sure if this aggregation process can be easily generalized. it probably depends too much upon the specific application. but of course the aggregation process could be running on an external machine and just feed back the stat-data into aggregation tables.

    This is exactly what we are doing to analyze the performance of students solving multiple-choice questions at our site. Students can even find out their performance compared to other students in the system :)

  • another option is to create special statistic table for every event you want to track: download_stats (file_id, download_count) In this case you just have totals, but maybe that is enough information for you.

What are people's ideas on the best way to implement this for both dotLRN and OACS?

I think a general user-tracking module is a nice idea. If certain requirements would be defined i think an approach similar to the general logging table mentioned above could work. (as aggregations are predefined). A module like that might produce data that could be used for many other purposes for example a member-value-system.

Collapse
Posted by Alfred Werner on
The gaping hole with using the logfile is that cookie-based authentication basically makes the user/group fields of a common log just appear as an unauthenticated access. Nsperm based access writes those fields but basically noone uses aolserver in that way. A little wish-list dream of mine is to have the cookie-derived user and group passed back into the HTTP headers after authentication, but before the log is written.

If 'activity' in general is the goal then logs will probably be a good starting point, but if you mean 'who did what when', then that approach is currently a dead end.

Collapse
Posted by Tilmann Singer on
Alfred, have you seen this thread about getting the user_id in the access log? https://openacs.org/forums/message-view?message_id=19404
Collapse
Posted by Andrew Piskorski on
Alfred, not at all. It is easy to set up things up so AOLserver logs the OpenACS user_id to the access log for every single hit. I've done it on sites I've run.

As far as I know, Vadim Nasardinov first came up with the method, back when we worked together at aD. :) It's since been discussed several more times.

Hm, maybe I should add this to the toolkit, with a simple config switch to turn it on/off...

Collapse
Posted by Andrew Piskorski on
Or rather I should have said, "Alfred, your wish is granted!" :)
Collapse
Posted by Alfred Werner on
W00+!! Amazing what can happen when you mutter your inner thoughts out loud :)