Statistics Parameters

Last modified by Eleni Cojocariu on 2026/09/11 18:27

Reference

The statistics parameters live in the "Statistics Plugin" section of xwiki/WEB-INF/xwiki.cfg, where 1 means true and 0 means false. They are read at startup, so a change takes effect only on the next restart.

ParameterDefaultShipped asWhat it does
xwiki.stats1commented outTurns the statistics module on or off for the whole instance: the storage thread and the page-view listener.
xwiki.stats.default0xwiki.stats.default=0Whether page views are stored for a wiki that does not define the statistics field described below. Shipped as 0, which is why storage is off on a new instance.
xwiki.stats.request.excludedUsersAndGroupsemptycommented out, without a valueThe users and groups filtered out of the statistics a request displays. Their views are still stored.
xwiki.stats.storage.excludedUsersAndGroupsemptyabsent from the fileThe users and groups whose views are never stored at all.
xwiki.stats.classcom.xpn.xwiki.stats.impl.XWikiStatsServiceImplcommented outThe implementation that records the statistics, for an instance that records them somewhere other than the XWiki database.

Three of them can be overridden per wiki, by a field of that wiki's XWiki.XWikiPreferences object, which wins over the file whenever it is not empty:

ParameterField of XWiki.XWikiPreferences
xwiki.stats.defaultstatistics
xwiki.stats.request.excludedUsersAndGroupsstatistics_request_excludedUsersAndGroups
xwiki.stats.storage.excludedUsersAndGroupsstatistics_storage_excludedUsersAndGroups

The statistics field does not exist until you create it. See Enable Statistics for a Subwiki.

Both lists are comma-separated, and an entity written without a wiki, such as XWiki.Admin, means that user on the wiki being read, while xwiki:XWiki.Admin means the one of the main wiki. A comma inside a name is escaped with a backslash.

This is how the two switches appear in the shipped file:

#-# Stats configuration allows to globally activate/deactivate stats module (launch storage thread, register events...).
#-# Enabled by default.
# xwiki.stats=1

#-# When statistics are globally enabled, storage can be enabled/disabled by wiki using the XWikiPreference property
#-# "statistics".
#-# Note: Statistics are disabled by default for improved performances/space.
xwiki.stats.default=0

The shipped file also documents xwiki.stats.excludedUsersAndGroups as the parameter that skips users "when storing statistics". That comment is wrong: the parameter has been deprecated since XWiki 2.5 and is only read as a fallback for the request filter. The storage filter is xwiki.stats.storage.excludedUsersAndGroups, which the shipped file does not mention at all.

FAQ

Can I exclude a whole group instead of listing users?

Yes. Both lists accept groups, and a group is expanded into its members every time the filter is read, so a user added to the group later is excluded too.

Related

Get Connected