The PageViewPlugin is a JSPWikiPluginBcc195432.431-43331.431.4ec88.19809.2Bxss.me that counts page views and presents the statistics on page views. The counters themselves are kept in memory and persisted in the JSPWiki work directory, loading and saving on startup and shutdown.

Three main functionalities are supported:

  • invisibly count page views, typically from the ReservedPages TitleBox or LeftMenu
  • show the page hits of the current page
  • show a list of page hits

Most of the functionality is present in the list format.

The plugin uses the following parameters:

  • show output format, values none|count|list, default is 'none'
  • count count page views?, values yes|no, default is 'yes' if output format equals 'none' and 'no' otherwise

The following parameters are used when format equals list:

  • entries maximum number of entries listed
  • min minimum page view count to be listed
  • max maximum page view count to be listed
  • sort sorting method, values name|count, default is 'name'
  • refer regular expression naming pages that have to be referred to to be included in the list. (To list popularity of category pages, use refer='Categories' or even refer='Categor*'.)
  • include filter pagenames to be included in the list
  • exclude filter pagenames to be excluded from the list
  • plugin body defines the content of the generated list. If it contains ---- separators, the body is split into header, line, and footer which are used to generate the table. Inside the line portion {1} represents the page name and {2} represents the page view count. {0} represents the (constant) current page name.

An example of the counter in TitleBox would be:

[{PageViewPlugin}]

An example of a table listing the top 50 pageviews excluding the main page and the administrative pages:

[{PageViewPlugin show='list' sort='count' entries='50' exclude='Main,*Pages'

* [{1}] ({2} views)
}]

A possible outcome of the above is:

An example of a table listing the pageviews on categories presenting popularity bars:

[{PageViewPlugin show='list' refer='Categories'

%%graphBars
|| Name  || Count
----
|  [{1}] | %%gBar {2} %%
----
%%
}]

Which could render as:

Live statistics#

We also created a page that has all pageview statistics of this wiki, see PageViewStatistics .


See: JSPWikiCorePlugins


Category.Plugins