XWiki Statistics Application

The Statistics application is no longer bundled with XWiki Standard but you can easily install it using the Extension Manager. You can use other analytics extensions with XWiki, see  https://xwiki.com/en/Blog/XWikiAnalyticsExtensions/.

Enable Statistics

Enable Statistics from the Configuration File

In XWiki Standard, the Statistics feature is disabled by default. In order to enable it, a system administrator has to edit the xwiki.cfg configuration file and make sure the value of the properties xwiki.stats and swiki.stats.default is set to 1, as shown below,

xwiki.stats=1
xwiki.stats.default=1

where:

  • xwiki.stats controls whether the Statistics feature is on or off
  • xwiki.stats.default controls whether the Statistics feature is on or off by default for the current Wiki

A restart of the wiki will be necessary to apply the changes. 

Enable Statistics from XWiki.XWikiPreferences

Since there is no UI available for enabling statistics, you will need to modify the administration page. First of all, edit the "XWiki.XWikiPreferences" class (/xwiki/bin/edit/XWiki/XWikiPreferences?editor=class) and add a Boolean property named statistics.

AddStatisticsProperty.png

Next, edit the "XWiki.XWikiPreferences" page in "Objects" mode (/xwiki/bin/edit/XWiki/XWikiPreferences?editor=object), expand the "XWiki.XWikiPreferences" object and set the "Statistics" property to "Yes".

SetStatisticsProperty.png

Access the Statistics Page

In order to access the Statistics home page click the DrawerMenuIcon.png icon which launches the drawer menu, then on "Application Index" in order to access the list of installed applications and finally on "Statistics".

ApplicationIndexDrawer.pngStatsAppIndex.png

You will notice that a panel is displayed for each of the 4 types of statistics.

StatsHomepage.png

XWiki tracks 4 types of statistics information:

Page Statistics

To access this page, click on the "Page Statistics" link in the bulleted list to the bottom of the home page or type the following URL: /xwiki/bin/view/Stats/Document.

By default, page statistics include:

  • a tracking of the most viewed and edited wiki pages.
  • a tracking of the most viewed and edited wiki spaces.

DocumentStatistics.png

Referrer Statistics

This page is available by clicking on the "Referrer" link in the bulleted list to the bottom of the home page or by typing the following URL: /xwiki/bin/view/Stats/Referrer.

The Referrer page contains statistics about:

  • the address of the web pages linking to your wiki which are displayed in the "Best Referrers" panel
  • the most referred pages

ReferrerStatistics.png

Visit Statistics

To access this page, click on the "Visit Statistics" link in the bulleted list to the bottom of the home page or type the following URL: /xwiki/bin/view/Stats/Visit.

The visit statistics list:

  • the most active contributors
  • the least active contributors

VisitStatistics.png

The "Changes" column allows you to know how many times the page in question has been edited.

Activity Statistics

This page is available by clicking on the "Activity Statistics" link in the bulleted list to the bottom of the home page or by typing the following URL: /xwiki/bin/view/Stats/Activity.

The Activity statistics track:

  • the current week activity
  • the current month activity
  • the current year activity
  • all time activity

ActivityStatistics.png

By default, these statistics count the non-unique visitors.

Display Wiki Statistics in Panels

The Statistics Application which provides a collection of panels, accessible by clicking the DrawerMenuIcon.png button which opens the drawer menu, then on "Administer Wiki". 

AdministerWikiMenu.png

In the wiki preferences page, click on "Look & Feel" -> "Panels" in the accordion menu to the left, then select the "Panel List" tab. 

PanelWizardIcon.png

The statistics panels are displayed under the "Information" category.

StatisticsPanels.png

To make any of these panels available in your wiki, go to the "Panels" documentation.

As the wiki grows bigger and it contains many spaces, pages and users, performance issues might appear causing an increased loading time for the Panel Wizard. At the moment, the easiest way to avoid this situation is to comment the code for the panels in the pages Page Statistics and  Visit Statistics. To do so, edit each panel in "Inline" mode as explained above and place the code between #* and *#.

Change the Default Number of Results

Supposing you want to change the default number of users listed in the "Most Active Contributors" panel, you need to go to the 'Panel List' tab of the wiki administration page. Next, search for the panel in question in the "Information" category and click on "Edit" which will make the panel available for edition in "Inline Form" mode.

MostActiveContributors.png

In the "Content" text area, search for the line $xwiki.criteriaService.rangeFactory.createHeadRange(5)) and replace the number "5" (the default value) a value of your choice.

MostActiveContributorsEdit.png

    

Related Pages

Search this space

 

Most popular tags

Failed to execute the [groovy] macro
  1. access rights
  2. activity stream
  3. annotation
  4. attachment
  5. comment
  6. Document Tree Macro
  7. export
  8. Extension Manager
  9. Flamingo skin
  10. global user
  11. Groovy event listener
  12. group
  13. nested page
  14. search
  15. skin
  16. syntax
  17. user
  18. user profile
  19. velocity macros
  20. wiki
  21. wysiwyg
  22. XWiki Applications
  23. xwikiattachment_archive table
  24. xwikiattachment table
  25. xwikiattrecyclebin table
  26. xwikiproperties table

[Display all tags from this space]