Child pages
  • 0.5.9 Release
Skip to end of metadata
Go to start of metadata


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 or by using the SiteStats JIRA section.


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:

  1. undeploy previous SiteStats deployment (folder structure and jar/war filenames have changed);
  2. run the appropriate database conversion script located in the 'updating/' folder;
  3. build/deploy with maven


The following events are processed by the tool:

Site visits

  • pres.begin


  • annc.revise.own
  • annc.revise.any
  • annc.delete.own
  • annc.delete.any


  • asn.revise.assignment
  • asn.delete.assignment
  • asn.submit.submission
  • asn.grade.submission


  • chat.delete.any
  • chat.delete.own


  • disc.null
  • 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)

Email archive

  • mail.delete.any
  • mail.delete.own


  • content.revise
  • content.delete


  • calendar.revise




  • (sakai 2.3 or higher)
  • wiki.revise
  • wiki.delete (sakai 2.3 or higher)
# override events to be processed by the tool:
# add events to be processed by the tool to the existing list:
# remove events to be processed by the tool from the existing list:

# by default, the tool does not process events generated by administrators.
# To override this setting set to true the following line:

Resource bundle

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.

Tool permissions

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.

Custom solution:

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.

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, and SakaiSite.jws (, other with these files already patched ( (you can use an utility like WinMerge to see changes). Just replace them in:

  • portal/portal-component/src/java/org/sakaiproject/portal/charon/
  • legacy/tools/src/java/org/sakaiproject/tool/sitesetup/
  • webservices/axis/src/webapp/SakaiSite.jws

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, 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.

Known bugs/issues/limitations

  • 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 report

Bug reports and features request can be submitted to the SiteStats JIRA section.

  • No labels