Extension:Metrica

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear action run.svg
Metrica
Release status: experimental
Extension-Metrica-1.png
Implementation Special page
Description Caches aware statistics collection framework
Author(s) Vedmakatalk
Latest version 0.1
MediaWiki 1.25+
Tables metrica
License MIT License
Download GitHub repository
Example Screenshot
Parameters
$wgMetricaExcludeSpecials
Added rights
metrica
Hooks used
BeforePageDisplay
LoadExtensionSchemaUpdates
ResourceLoaderGetConfigVars
Translate the Metrica extension if it is available at translatewiki.net
Check usage and version matrix.

Metrica is caches-compatible statistics collection extension for Mediawiki. It allows to collect number of page views (and page edits) even when your Mediawiki is hardly cached ( opcache, squid, file-cache, etc ), because metrics are sent from client to server ( like Google Analytics ).

Installation[edit]

  • Download and place the file(s) in a directory called Metrica in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'Metrica' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

To users running MediaWiki 1.24 or earlier:

The instructions above describe the new way of installing this extension using wfLoadExtension() If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of wfLoadExtension( 'Metrica' );, you need to use:

require_once "$IP/extensions/Metrica/Metrica.php";

Configuration parameters[edit]

You can enable or disable metrics collection for special pages by changing $wgMetricaExcludeSpecials variable. By default special pages are excluded from tracking.

User rights[edit]

Only users with metrica right are allowed to visit Special:Metrica page. By default only sysops granted with this permission.