Child pages
  • How to add support for my tool in Site Stats
Skip to end of metadata
Go to start of metadata

Table of Contents


Site Stats trunk or >= 2.0 (unreleased) and EntityBroker >= 1.3.5 (present in Sakai 2.6 or trunk) are required for the features demonstrated on this page.

1. How it works

SiteStats consults the EntityProviderManager service to find which tools implement the Statisticable capability from EntityBroker. This capability - implemented by tools - provides the following information to Site Stats:

  • Associated sakai tool id
  • List of events to be supported in SiteStats
  • Localized events description

2. Example

Suppose you have already a basic Entity Provider capability, as shown on the next code listing: with basic AutoRegisterEntityProvider capability

Adding the Statisticable capability to your class, will require you to implement 3 new methods. The code belows assumes that a '' message bundle exists and contains the event descriptions. with Statisticable capability

After this, you can log events as usual using the EventTrackingService and these events will be automatically supported in SiteStats (using cover for simplicity):

Example of event logging

3. Related configuration bits

By default, SiteStats will use the (localized) event descriptions provided by the Statisticable interfaces and, if not found, fallback to local event descriptions provided within the Site Stats bundles. You can change this behavior with the following setting in

  • checkLocalEventNamesFirst@org.sakaiproject.sitestats.api.event.EntityBrokerEventRegistry = true
  • No labels