| Table of Contents |
|---|
1. Information
All the configuration keys referred on this page are optional and therefore are not required to startup Sakai with SiteStats. These keys should go in sakai.properties
| Upgrading from 0.5.x releases Please note that the configuration keys in sakai.properties have changed in the pre_1-0 release. You need to review your configuration based on the information provided on this page. Starting Sakai with invalid configuration keys will lead to a startup failure. |
2. Site Stats configuration options
2.1. Default chart rendering options
| Configuration key | Description | Default value |
|---|---|---|
| chartBackgroundColor@org.sakaiproject.sitestats.api.StatsManager | Default chart background color | white |
| chartIn3D@org.sakaiproject.sitestats.api.StatsManager | Show charts in 3D by default? | false |
| chartTransparency@org.sakaiproject.sitestats.api.StatsManager | Default chart transparency (acceptable values: 0.10f - 1.00f, where 0.10f = 10% and 1.00f = 100%) | 1.00f |
| itemLabelsVisible@org.sakaiproject.sitestats.api.StatsManager | Show bar charts item labels by default? | false |
| enableSiteVisits@org.sakaiproject.sitestats.api.StatsManager | Force the enable/disable of display visits related information in the tool | Tool checks if presence is enabled/disabled or if 'presence.events.log' property is set in Sakai to determine default value |
| enableSiteActivity@org.sakaiproject.sitestats.api.StatsManager | Enable/disable the display of the activity chart in SiteStats Summary page. | true |
2.2. Event aggregation configuration options
2.3. Tool/event support (add/remove)
| Generated events may differ between Sakai releases SiteStats have different event definition files for different Sakai releases. You may want to point * toolEventsDefinitionFile* setting below to the appropriate file in your installation (view folder content). A filename without version number means it is for the current sakai release. |
| Configuration key | Description | Default value |
|---|---|---|
| SiteStats <=1.2: toolEventsAddDefinitionFile@org.sakaiproject.sitestats.api.StatsUpdateManager SiteStats >=1.3: toolEventsAddDefinitionFile@org.sakaiproject.sitestats.api.event.FileEventRegistry |
Path to tool event definition file: add support for new tools or new events to existing tools. Can also be used to change default selected flag. | n.a. |
| SiteStats <=1.2: toolEventsRemoveDefinitionFile@org.sakaiproject.sitestats.api.StatsUpdateManager SiteStats >=1.3: toolEventsRemoveDefinitionFile@org.sakaiproject.sitestats.api.event.FileEventRegistry |
Path to tool event definition file: remove support for entire Tools or subset of Tool events. | n.a. |
| SiteStats <=1.2: toolEventsDefinitionFile@org.sakaiproject.sitestats.api.StatsUpdateManager SiteStats >=1.3: toolEventsDefinitionFile@org.sakaiproject.sitestats.api.event.FileEventRegistry |
Path to tool event definition file (events to be collected). This will completely replace the default bundled definition file. | toolEventsDef.xml |
| SiteStats >=1.3: checkLocalEventNamesFirst@org.sakaiproject.sitestats.api.event.EntityBrokerEventRegistry |
Whether to first check local event descriptions provided within the Site Stats bundles and, second, check event descriptions provided in Statisticable capability implementations. By default this is false (reverse order). | false |
Note: The recommendation here is to not replace the default bundled configuration file in order to get support for additional tools uppon SiteStats updates.
| Warning When adding new tool events, the event description must be specified in the appropriate resource bundle file located in the sitestats/sitestats-impl/src/bundle/org/sakaiproject/sitestats/impl/bundle folder! |
2.3.1 Tool event definition file (excerpt)
Below is an excerpt of the tool event definition file used by SiteStats.
<?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>
XML Fields Description
| <TOOL> | A Sakai tool |
|---|---|
| tool – toolId | Sakai tool id |
| tool – selected | Selected by default? |
| <EVENT> | An event logged by the tool |
| tool – event – eventId | Logged event id |
| tool – event – selected | Selected by default? |
| <EVENTPARSERTIP> | Parsing tip of the REF field for contextId (site id) |
| tool – eventParserTip – for | Context id |
| tool – eventParserTip – separator | String separator |
| tool – eventParserTip – index | Index position |
Example event reference for an Announcement logged event:
annc.new | /announcement/channel/~e65550f9-14c5-41ac-80be-a0657febd4ca/main
2.4. Enabling tracking of site visits
In Sakai 2.4.x / 2.5.x:
In order to be possible to track site visits in Sakai, the list of users present in site must be enabled (Sakai Presence service). If
is not applied into your sakai installation (most probable), 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 (see
) as long as the following configuration key is specified in sakai.properties:
presence.events.log = true
Common:
The tool will hide all visits related information if presence events are disabled in sakai.properties. However, you can force the enable/disable of visits related information in SiteStats:
| Configuration key | Description | Default value |
|---|---|---|
| enableSiteVisits@org.sakaiproject.sitestats.api.StatsManager | Force the enable/disable of display visits related information in the tool | Tool checks if presence is enabled/disabled or if 'presence.events.log' property is set in Sakai to determine default value |
2.5. External database configuration options
| Version This feature requires SiteStats version >= 1.2 or trunk. |
| Configuration key | Description | Default value |
|---|---|---|
| sitestats.db | Whether to use internal Sakai database or external database (same or different server) for SiteStats tables. Possible values: internal, external | internal |
| sitestats.externalDb.auto.ddl | Set whether to execute a schema update after SessionFactory initialization | true |
| sitestats.externalDb.hibernate.dialect | Hibernate dialect for external db | org.hibernate.dialect.HSQLDialect |
| driverClassName@org.sakaiproject.sitestats.externalDbDataSource | Fully qualified Java class name of the JDBC driver for external db | org.hsqldb.jdbcDriver |
| url@org.sakaiproject.sitestats.externalDbDataSource | Connection URL to be passed to JDBC driver for external db connection | jdbc:hsqldb:mem:sitestats_db |
| username@org.sakaiproject.sitestats.externalDbDataSource | Username for external db | sa |
| password@org.sakaiproject.sitestats.externalDbDataSource | Password for external db |
By default, the datasource connection pool is configured as follows:
- initialSize = 3
- maxActive = 5
- maxIdle = 3
- minIdle = 3
- timeBetweenEvictionRunsMillis = -1
More datasource options are available at the Apache Commons API javadocs page.
3. Other configuration options
3.1 Enabling tracking of Wiki page reads
SAK-11214resolution, you may need to either add a configuration key to sakai.properties (see jira) or manually perform the following change (with Sakai offline):
- open /rwiki-tool/tool/src/webapp/WEB-INF/commandComponents.xml
- set property trackReads of bean uk.ac.cam.caret.sakai.rwiki.tool.service.api.CommandService to true
- save the file and redeploy rwiki component