Site Stats is a tool for Sakai 2.1 or higher for showing site statistics by user, event, or resource. It collects data in real time by using the EventTrackingService (Event API).
Currently, it has an overview page with summary information about site visits and activity, an events page listing site events, a resources page listing site resource activity, and a preferences page. There is also an administrator version of the tool, with a site list view.
Feel free to send suggestions to firstname.lastname@example.org or by using the SiteStats JIRA section.
Use the 'Site Info' tool to add SiteStats to a site - "sakai.sitestats" for course/project sites, "sakai.sitestats.admin" for administrator sites.
The overview page shows a weekly/monthly/yearly snapshot of activity in the site and simple statistics (totals and averages) about site visits and activity.
The events page list all tracked events grouped by user and date. Events can searched by user name or Eid, filtered by groups, or by time period.
The resources page list all resources associated events (new, read, revise, delete) grouped by user and date. It can searched by user name or Eid, filtered by groups, or by time period.
The preferences page allows a user to select the events to be displayed in Events page and the events to count as Activity in the Overview page.
The site list page (only available in the administrator version of the tool) allows to view statistics for any site (SiteStats doesn't need to be available as a tool on that site).
The latest release is 0.5.9. Version 0.5.3 was the first to add Oracle support.
Source can be checked out from the svn repository as well as a prepared zip file.
For a list of changes please read the changes.txt file.
The standard way in Sakai 2.x is to copy the source folder into the Sakai source tree and run maven on it ('maven sakai'). If you need further help please follow these instructions or the instructions in the readme.txt file.
If upgrading from previous releases:
The following events are processed by the tool:
# override events to be processed by the tool: eventIds@StatsManager=pres.begin,content.read,... # add events to be processed by the tool to the existing list: addEventIds@StatsManager=pres.end,content.read,... # remove events to be processed by the tool from the existing list: removeEventIds@StatsManager=pres.end,content.read,... # by default, the tool does not process events generated by administrators. # To override this setting set to true the following line: collectAdminEvents@StatsManager=true
When adding new event ids, the event description must be specified in the appropriate resource bundle file located in the sitestats/sitestats-impl/impl/src/bundle/org/sakaiproject/sitestats/impl/bundle folder!
Sakai 2.3 addresses SAK-4120. Sitestats will be displayed in left menu for all users with the 'sitestats.view' permission. Also, Sitestats admin version can be displayed for users with the 'sitestats.view.admin' permission.
For SiteStats 0.5.5 or higher, the 'sitestats.view' permission IS REQUIRED in order to use the tool. Please either add the permission to the '!site.helper' realm or use a script to update existing realms.
Sakai up to 2.2.x does not support permission-sensitive pages. Alternatively, you can use the custom solution explained below.
At UFP, we are running custom patches in our production server to filter tools by role. These patches have no implication on other tools since only the '<configuration>' tag in the tool xml descriptor file is used. Looking closely in sitestats tool file (sakai.sitestats.xml) the following line is already present:
<configuration name="roles.allow" value="maintain,Instructor" />
Any tool can be filtered by just adding configuration parameters like the one above in tool xml file or in tool configuration fields in 'Sites' tool.
In the attachments sections there are 2 zip files for sakai 2.1.2 (tag), one with patches for CharonPortal.java, SiteAction.java and SakaiSite.jws (Patches-Sakai_2-1-2.zip), other with these files already patched (PatchedFiles-Sakai_2-1-2.zip) (you can use an utility like WinMerge to see changes). Just replace them in:
The first file is for filtering tools by role (or pages with one forbidden tool) on the portal and the second for not allowing tool add/remove in Site Info if current user doesn't have permissions.
In the attachments sections there are 2 zip files with the patched files CharonPortal.java, SiteAction.java and SakaiSite.jws:
The first and third files are for filtering tools by role (or pages with one forbidden tool) on the portal, the second for not allowing tool add/remove in Site Info if current user doesn't have permissions.
Bug reports and features request can be submitted to the SiteStats JIRA section.