Extended statistics

< Manual:Extension(Redirected from Manual:Extension/ExtendedStatistics)


The extension ExtendedStatistics provides an analytic view of many relevant parameters on the wiki, providing wiki administrators better insight into the functioning of the wiki.

Where to find Extended statistics

The navigation link Extended statistics in the tab Global actions loads the page Special:ExtendedStatistics.


Extended statistics navigation link
Extended statistics navigation link

Choosing a data source

ExtendedStatistics can show data for multiple aspects of the wiki. Available data sources are:

  • Number of users: All the users that registered in the period chosen
  • Number of pages: All pages created in the period chosen.
  • Number of content pages: All articles in content namespaces created in the period chosen
  • Number of edits: All edits carried out in the period chosen
  • Edits per user: Number of edits per user in the period chosen
  • Search queries: All terms users searched for in the period chosen. Only availble if BlueSpiceExtendedSearch is installed.

Choosing filters

General filters:

  • From - Date from which to display data
  • To - Date to which to display data

Some data sources may have additional filters available, like for data sources based on wiki pages, namespace filter is available.


Selecting a query type
Selecting a query type


Display settings

The display of the results is determined by the following settings:

  • Interval - grain of the diagram - determines which time unit will be used to group the data.
  • Mode - display type:
    • Absolute - shows changes in data for the given period
    • Aggregate - shows running total for the data source choosen
    • List - shows data in tabular view - only avaiable for search statistics
Note:Depending on the selected time period, the interval has to be set accordingly. For, example if you look for data between 02.06. and 03.06. for the same year, the interval setting "Year" will not return any data. Change the interval to "Week" or "Day" to return results.

Viewing the results

Once all the filters and options are set, click on the Results tab to show the resulting data.


Results
Result view with export buttons


Chart export

In results view there is an Export-button that allows the user to export and download the currently displayed chart as SVG.

Data export

Maintenance script

A php maintenance script will be provided on the following location:

<mw-root>/extensions/BlueSpiceExtendedStatistics/maintenance/ExportCollection.php

Usage

This script must be called on the command line of the server. It takes the path of a configuration file in JSON format.

Example

php <mw-root>/extensions/BlueSpiceExtendedStatistics/maintenance/ExportCollection.php \
    --config=<path-to-file>/myConfig.json \
    --exportto=/tmp/myExport.xslx

Params

  • --config - path to config file
  • --exportto - path to the file, the data gets exportet to. Note that vaiable file formats are xsl, xslx and csv

Scirpt configuration

The script configuration will take the same parameters as the API, which is used on Special:ExtendedStatistics.

Params

  • aggregate
  • filter

Example contents

The following examples show the content of the JSON file provided to --config.

"Page views" aggregated by date over 1 year

{
	"aggregate": [
		{
			"property": "timestampcreated",
			"type": "daily",
			"targets": [
				"pagetitle",
				"numberhits",
				"numberhitsaggregated"
			]
		}
	],
	"filter": [
		{
			"property": "type",
			"type": "string",
			"value": "hitcounter",
			"comparison": "eq"
		},
		{
			"property": "timestampcreated",
			"type": "date",
			"value": "20200707120000",
			"comparison": "gt"
		},
		{
			"property": "timestampcreated",
			"type": "date",
			"value": "20210707120000",
			"comparison": "lt"
		}
	]
}

"Review by namespaces" aggregated by namespace over 1 year:

{
	"aggregate": [
		{
			"property": "namespacename",
			"type": "string",
			"targets": [
				"ongoingpages",
				"expiredpages",
				"notrunningpages",
				"ongoingpagesaggregated",
				"expiredpagesaggregated",
				"notrunningpagesaggregated"
			]
		}
	],
	"filter": [
		{
			"property": "type",
			"type": "string",
			"value": "reviewedpages-ns",
			"comparison": "eq"
		},
		{
			"property": "timestampcreated",
			"type": "date",
			"value": "20200707120000",
			"comparison": "gt"
		},
		{
			"property": "timestampcreated",
			"type": "date",
			"value": "20210707120000",
			"comparison": "lt"
		}
	]
}


Configuration

In the Config manager, you can change the following settings:


  • Exclude these users: Some user groups, like WikiSysop can skew the statistics, for example the statistics for search queries or because they complete automated maintenance tasks. These types of user groups can be excluded from the statistical results.
  • Maximum number of interval steps: Sets the size of the x-axis for the results. For a few days, select the interval Day or Calendar Week, for periods over one year, select Year or Month. If you do not get any results for your query, try to adjust the interval accordingly.


Related info

Attachments

Discussions