Forum OpenACS Q&A: Re: Monitoring user activity

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.