Extension:StatisticsLog

From MediaWiki.org
Jump to: navigation, search


MediaWiki extensions manual - list
Crystal Clear action run.png
StatisticsLog

Release status: beta

Implementation User activity, Special page
Description Enables detailed usage monitoring
Author(s) WiterateTalk
MediaWiki 1.15+ (maybe lower)
License GPL
Download code

Check usage (experimental)

StatisticsLog extension enables a very accurate usage monitoring inside your MediaWiki by providing a new Special page - Special:StatisticsLog. This enables you to view individual user page hits, by user or by page.

[edit] Installation

  1. Get the code and create the files accordingly.
  2. Create a new folder in your extensions directory. Name it StatisticsLog.
  3. Add
    require_once( "$IP/extensions/StatisticsLog/StatisticsLog.php" );
    
    to the bottom of LocalSettings.php.
  4. Installation can now be verified through Special:Version of your wiki.

[edit] Parameters

This extension adds these global parameters:

  • $wgExcludedNameSpaces - Defines excluded Namespaces from your statistics (array). Default values are none (all namespaces are monitored)
  • $wgHistoryYears - Defines how many years back to show you statistics. Default value is 5.

For example, to exclude the "MediaWiki" namespace define

$wgExcludedNameSpaces[] = 8;

right after

require_once( "$IP/extensions/StatisticsLog/StatisticsLog.php" );

in your LocalSettings.php


[edit] API's

This extension also provides direct URL request through the GET method. To achieve that simply point your browser to the address of the special page with the desired parameters. For example:

http://<yourwikiaddress>/<yourwikifolder>/index.php?title=Special:Statistics_log&username=WikiSysop
 &startdate_year=2010&enddate_year=2011&enddate_month=2&getstat=true
Parameter Elaboration example usage
getstat mandatory, must be specified in order to get results getstat=true
username The name of the user we are interested to know stats about username=WikiSysop
pagename The name of the page we are interested to know stats about pagename=Main_Page
startdate_year The start year for the query startdate_year=2011
startdate_month The start month for the query startdate_month=3
startdate_day The start day for the query startdate_day=15
enddate_year The end year for the query enddate_year=2011
enddate_month The end month for the query enddate_month=3
enddate_day The end dat for the query enddate_day=15
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox