Extension:StatCounter.com Integration

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
StatCounter.com Integration
Release status: stable
Implementation User activity
Description Inserts StatCounter.com script into MediaWiki pages for tracking
Author(s) Jack Phoenix
Latest version 1.1
MediaWiki 1.32+
License Public domain
Download
Hooks used
SkinBuildSidebar
Translate the StatCounter.com Integration extension if it is available at translatewiki.net
Check usage and version matrix.

The StatCounter extension inserts StatCounter.com script into MediaWiki pages for tracking. The hit counter is displayed on the sidebar, in a new portlet. This portlet's title can be customized by editing [[MediaWiki:Statcounter]].

Installation[edit]

  • Download and place the file(s) in a directory called StatCounter in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'StatCounter' );
    
  • Fill in [[MediaWiki:Statcounter-project-id]] (with a number) and [[MediaWiki:Statcounter-security]] (with a string). You will find the correct values for both of these as values of the JavaScript variables sc_project and sc_security, respectively, as provided to you by StatCounter.com
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

See also[edit]