Extension:HitCounters

The HitCounters extension provides the page views functionality that was removed in MediaWiki 1.25. HitCounters displays the view count in the page footer and the most viewed pages on a special page called Special:PopularPages.

Benefits
This extension provides feedback in the form of audience measurement to editors.

Knowing the rough size of one's audience as an editor can provide an incitement benefit for improving more popular articles.

Special:PopularPages encourages editors of a wiki project to focus on improving those articles with the highest traffic, and helps readers discover a project's most curated content.

It also enables determining the wikiFactor, a rough measure of a wiki website's popularity.

Installation
If you install a new wiki, you don't have to care about old hitcounter numbers.
 * New Installation

If you run MediaWiki 1.25 (or newer) you have no visits (hitcounter numbers) yet. Installing HitCounters you will start from zero.

If you run a MediaWiki version before 1.25, you have to prevent loss of your hitcounter numbers.
 * Migration from before MediaWiki 1.25

Differences from core MediaWiki implementation
Before MediaWiki 1.25, the page views counting functionality was in core MediaWiki. This extension is based on that same code, but was deliberately done in a more lightweight way in order to speed up processing time. Many lines of superfluous code were removed. Also, the old MediaWiki core code did numerous database queries on every page hit; these have all been removed as well. This change may possibly lead to some inaccuracies in the data.

The core differences that wiki administrators need to know are:
 * The hit counts are stored in cache.
 * The visible hit count at the bottom of each page is updated only once per day. (Pages with hit count less than 100 are updated once per minute.)
 * If you refresh your browser on a wiki page, that hit is ignored.

What counts as view
According to tests conducted by several MediaWiki operators, a view is counted if a page is accessed normally, as well as  and when accessing a page revision.

A view is not counted with the other actions, such as,   and.

Localisation
Special page aliases should be created in HitCounters.i18n.magic.php, and magic word aliases in HitCounters.i18n.magic.php.

Variables

 * When set to, it disables the notice in the pages footer saying "" as well as the special page  . This configuration parameter was removed with MediaWiki 1.35.0.
 * Sets how often page counters should be updated.
 * $wgEnableCountersAtTheFooter
 * This variable is only available in the fork of HitCounters since Version 0.3.3. When set to, it only disables the notice in the footer of the pages, but NOT the special page   or the counting functionality itself.
 * $wgEnableCountersAtTheFooter
 * This variable is only available in the fork of HitCounters since Version 0.3.3. When set to, it only disables the notice in the footer of the pages, but NOT the special page   or the counting functionality itself.

Incompatible extensions
I need bug reports in Phabricator so that they can be worked on. If you run into a problem with one of the following, please create a phabricator task and link to it here. -- ☠ MarkAHershberger ☢ (talk) ☣ 16:02, 30 July 2016 (UTC)

Fixed issues

 * This extension previously confused the display of accesses for pages with the same name across namespaces. Resolved by for REL 1_31 and above.


 * Extension:AbuseFilter error fixed by task T121155 for REL 1_32 and above.


 * Extension:DynamicPageList_(Wikimedia) and Extension:DynamicPageList_(third-party) fixed by task T219063 for REL 1_26 and REL 1_27.

Backward compatibility
Version 0.3.2 of this extensions fork is backward compatible to MediaWiki 1.25. See here.

Version 0.3.2.3 of this extensions fork contains the latest improvements but is only for MediaWiki 1.35+. See here.