Statistics Configuration

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

Explanation

XWiki records page views itself: a listener observes them and a storage thread writes them to the database. Nothing bundled reads that data back. The Statistics Application is its only interface, and it has neither been bundled nor maintained since XWiki 8.0; its own extension page recommends the Matomo Integration instead, which tracks page views in a Matomo server of your own and ignores every setting on this page.

So the switches below decide whether XWiki fills its statistics tables, not whether anybody can read them. Three of them decide whether a page view is stored, and one ships turned off.

The three switches

  • xwiki.stats, in xwiki/WEB-INF/xwiki.cfg, turns the statistics module on or off for the whole instance: the storage thread and the listener. It is on unless you turn it off.
  • The statistics field of a wiki's XWiki.XWikiPreferences object turns storage on or off for that one wiki, and has to be added by hand.
  • xwiki.stats.default decides for every wiki that has no such field. It is the one statistics line the shipped xwiki.cfg leaves uncommented, and it ships as 0, so statistics storage is off on a new instance, whatever the module switch says.

Whether a page view is recorded

Statistics Parameters lists these properties with their defaults, and the two properties that filter out the users whose activity is never counted. In a multi-wiki instance, that is also where the difference between the instance-wide default and a wiki's own field matters most.

FAQ

Does turning statistics off delete the statistics already recorded?

No. The switches stop new page views from being stored; the rows already written stay in the database until they are removed by hand.

Does anything bundled stop working if I set xwiki.stats to 0?

Yes, the "Recently Visited" panel: it reads the recent actions the statistics listener keeps in the HTTP session, so it stays empty while the module is off. Storage being off, which is the shipped default, does not affect it.

More

To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.

Related

Get Connected