Dr. David Roldán MartínezUniversidad Politécnica de Valencia, Spain
&Nuno FernandesUniversidade Fernando Pessoa, Portugal
Site Stats, the power of event tracking at a single click in Sakai
The begining of the project
Site usage statistics Audience:
Sakai administrators Site maintainers (instructors,…)
Available for Sakai 2.2+ Based on Sakai Event service
The begining of the project
Active development team Current status available at
http://jira.sakaiproject.org/jira/browse/STAT/fixforversion/11273
Site Stats 1.0 Features
Display summary information about site visits and tool activity Display visits and tool activity charts Generate reports based on site visits, tool activity and resources
actions
Site Stats 2.0 main changes
Switched to Apache Wicket as rendering engine (instead of JSF) Improved service API Improved stability Added support for more Sakai tools Report definitions per site and predefined by admin Grouping results capabilities Redesigned Report editing page to accommodate new report
options Redesigned Overview page with a compact view to present
most requested information from Instructors directly from the first page.
Site maintainer view
Information organized in 2 tabs: Overview
(summary information for site visits and activity) Reports
(site visit reports, tool and resource activity)
Site maintainer view: Overview tab
Statistics (totals and averages) about site visits and activity: visits activity (sum of selected events) resources
Site maintainer view: Overview tab
Snapshot of site visits
Site maintainer view: Overview tab
Snapshot of site activity:
Site maintainer view: Overview tab
Snapshot of site resources:
Site maintainer view: Reports tab
Generate reports based on: site visits tool events Resources
Narrow search by: specific tools, events or resources pre-defined or custom time periods all/specific users, roles, groups or non-matching users
Excel or CSV file export
Site maintainer view: Preferences tab
Select tools or events to be counted as activity on overview screen
Site Stats administration
Two main phases Installation (off-line)
Site Stats deployment Tomcat configuration Event aggregation configuration Event storage configuration Tool events definition
Site configuration (on-line) Preferences tab
Site Stats administration
Site Stats deployment Download source code:
svn co https://source.sakaiproject.org/contrib//ufp/sitestats/tags/a_sitestats_tag/ sitestats
Edit pom.xml file and change the version tag to reflect sakai version Run Maven to compile SiteStats:
For sakai <= 2.4.x, use Maven 1:• maven sakai
For sakai >= 2.5 or trunk, use Maven 2:• mvn clean install sakai:deploy
Make sure there are no multiple versions of sitestats jars in {tomcat_folder/shared/lib} (named sakai-sitestats-*.jar)
Site Stats administration
Tomcat configuration Make sure -Djava.awt.headless=true is added to JAVA_OPTS
environment variable.
Site Stats administration
Configuration Event aggregation configuration options Event storage configuration Tool/event support Performance considerations
Site Stats administration
Event aggregation configuration http://bugs.sakaiproject.org/confluence/display/STAT/
Configuration+Options#ConfigurationOptions-2.2.Eventaggregationconfigurationoptions
On-line: Real-time, performance impact in heavy load conditions
Off-line through a quartz job Can be scheduled to be made on low load periods
Site Stats administration
Event storage configuration http://bugs.sakaiproject.org/confluence/display/STAT/
Configuration+Options Same database
Easier management Different database
More complex management
Site Stats administration
Tool event definitions loaded from: default file (xml) custom file in sakai.home (xml)
Tool event definitions matched with: available tools in the Sakai installation available tools in site (by default)
Site Stats administration
<?xml version="1.0" encoding="UTF-8" ?><toolEventsDef> <!-- announcements --> <tool toolId="sakai.announcements" selected="true"> <event eventId="annc.new" selected="true"/> <event eventId="annc.revise.own" selected="true"/> <event eventId="annc.revise.any" selected="true"/> <event eventId="annc.delete.own" selected="true"/> <event eventId="annc.delete.any" selected="true"/> <eventParserTip for="contextId" separator="/" index="3"/> </tool><!-- (...) --></toolEventsDef>
toolId – Sakai tool idselected - Selected by default?
eventId – Logged event idselected - Selected by default?
For – ContextIdseparator – String separator (i.e. '/')index – index position
Site Stats administration
Enabling tracking of site visits In Sakai 2.4.x / 2.5.x:
The list of users present in site must be enabled (Sakai Presence service). If SAK-8499 is not applied into your sakai installation, the following
configuration key is required in sakai.properties:• display.users.present = true
In Sakai trunk / 2.6+: The list of users present in site is not a requirement anymore The following configuration key is specified in sakai.properties:
• presence.events.log = true
Common:• [email protected]
Site Stats administration
Other performance considerations Event filtering
Events can be collected only for those sites using the property:
collectEventsForSiteWithToolOnly@org.sakaiproject.sitestats.api.StatsUpdateManager = true (default)
Administrator generated events can also be discarded: collectAdminEvents@org.sakaiproject.sitestats.api.StatsUpdateManager =
false (default) Type of events to be aggregated can also be limited, if there is interest.
The default configuration file is toolEventsDef.xml.
Site Stats administrator
Check for database table indexes There is a bug in Hibernate that prevents the correct creation of
table indexes when creating the SiteStats tables with auto.ddl= true.
Check that all the indexes have been created and match the ones on these files:
MySQL ddl Oracle ddl
Site Stats developer
Not all Sakai tools provide events to Site Stats. http://bugs.sakaiproject.org/confluence/display/UDAT/
Log+Events+Descriptions+-+Sakai+2.5.x How it works
SiteStats consults the EntityProviderManager service to find which tools implement the Statisticable capability from EntityBroker.
Staticable interface provides the following information: Associated sakai tool id List of events to be supported in SiteStats Localized events description
Site Stats developer
Adding the Statisticable capability to your class, will require you to implement 3 new methods:
public String getAssociatedToolId() public String[] getEventKeys() public Map<String, String> getEventNames(Locale locale)
Log events using the EventTrackingService
Conclusions
Site Stats provide a simple way to get basic information about how your Sakai sites are used.
Multiple configurations are available. We are open to suggestions and contributions
Any question?
Dr. David Roldán Martí[email protected] Politécnica de Valencia
Nuno [email protected] Fernando Pessoa
Top Related