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.
Using the tool
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:
- undeploy previous SiteStats deployment (folder structure and jar/war filenames have changed);
- run the appropriate database conversion script located in the 'updating/' folder;
- build/deploy with maven
The following events are processed by the tool:
- disc.delete.any (sakai 2.2.1 or higher)
- disc.delete.own (sakai 2.2.1 or higher)
- disc.delete.category (sakai 2.2.x or higher)
- wiki.new (sakai 2.3 or higher)
- wiki.delete (sakai 2.3 or higher)
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!
Preventing the tool from appearing in left menu (role/function based)
Sakai 2.3.x or higher
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 2.1.x or 2.2.x
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:
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.
Applying custom changes (for Sakai 2.1.2 (tag)):
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.
Applying custom changes (for Sakai 2.2 (tag and branch)):
In the attachments sections there are 2 zip files with the patched files CharonPortal.java, SiteAction.java and SakaiSite.jws:
- PatchedFiles-Sakai_2-2-0-TAG.zip for sakai 2.2.0 (tag)
- PatchedFiles-Sakai_2-2-1-TAG.zip for sakai 2.2.1 (tag)
- PatchedFiles-Sakai_2-2-x-BRANCH-r14197.zip for sakai 2.2.x (branch, r14197)
Just copy the files from the appropriate zip file to:
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.
- Assignments tool: SAK-4315: When grading in Assignments, 'asn.submit.submission' events are logged to SAKAI_EVENT instead of 'asn.grade.submission' (partially? fixed in r11229 / sakai_2-2-007);
- Email archive: unable to process email attachments (no reference to site id);
- Discussion tool: SAK-5340: Category related events are always logged as 'disc.null' (FIXED in r13002 / sakai_2-2-x);
- Message Center: SAK-5341: Events logged should have unique ID and normalized reference;
Bug reports and features request can be submitted to the SiteStats JIRA section.