Extension:HitCounters/de-formal

From mediawiki.org
This page is a translated version of the page Extension:HitCounters and the translation is 11% complete.
MediaWiki extensions manual
HitCounters
Release status: stable
Implementation Database , Data extraction, MyWiki
Description Provide the page views functionality
Author(s) Mark A. Hershberger (MarkAHershbergerDiskussion)
Latest version 0.4
MediaWiki >= 1.36.0
PHP 7.3.19+
Database changes Yes
Composer mediawiki/hit-counters
Tables hit_counter
hit_counter_extension
License GNU General Public License 3.0 or later
Download
  • $wgDisableCounters
  • $wgEnableAddPageId
  • $wgHitcounterUpdateFreq
  • $wgEnableAddTextLength
hitcounter-exempt
Quarterly downloads 196 (Ranked 38th)
Translate the HitCounters extension if it is available at translatewiki.net
Vagrant role hitcounters
Issues Open tasks · Report a bug

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

About

Benefits

This extension provides feedback in the form of audience measurement to editors. Knowing the rough size of one's audience as an editor allows editors to identify and improve popular articles. HitCounters' special page PopularPages also allows editors to focus on improving those articles with the highest traffic, and helps readers discover a project's most curated content.

HitCounters extension enables determining the wikiFactor, a rough measure of a wiki website's popularity.

HitCounters extension is minimally intrusive with respect to data security and privacy concerns. The extension handles metrics on the server side so aggregated data stays within the site's security boundary. The extension does not inject JavaScript to be executed by the client, and does not ask a client to download additional un-audited code from a third party, like GoogleAnalyticsMetrics.

The extension does not track users who visit a page. As such, there's no need for special handling of Do Not Track browser requests or Global Privacy Control settings. The extension also does not use third party services, like GoogleAnalyticsMetrics.

The extension does not have dependencies which can cause conflicts. Other extensions, like GoogleAnalyticsMetrics, can cause problems during a Composer update. Also see Phabricator P6481 .

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 (action=view), as well as action=render and when accessing a page revision.

A view is not counted with the other actions, such as action=raw, action=edit, and action=info.

Migration

If you are migrating from a version of MediaWiki 1.25 and earlier to a newer version, you must ensure to follow the advice and documentation outlined in this version of the documenation.

Installation

You can use composer to install this extension by running the following two commands in your MediaWiki directory:

  • Die Erweiterung herunterladen und die Datei(en) in ein Verzeichnis namens HitCounters im Ordner extensions/ ablegen.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HitCounters
  • Folgenden Code am Ende Ihrer LocalSettings.php -Datei hinzufügen:
    wfLoadExtension( 'HitCounters' );
    
  • Führen Sie das Aktualisierungsskript aus, welches automatisch die notwendigen Datenbanktabellen erstellt, die diese Erweiterung braucht.
  • Configure as required.
  • Yes Done – Zu Special:Version in dem Wiki (bei Einstellung auf deutsch nach Spezial:Version) navigieren, um die erfolgreiche Installierung der Erweiterung zu überprüfen.


Vagrant-Installation:

  • Wird Vagrant benutzt, ist mit vagrant roles enable hitcounters --provision zu installieren

Konfiguration

  • $wgDisableCounters
    When set to true, it disables the notice in the pages footer saying "Diese Seite wurde bisher 256-mal abgerufen." as well as the special page PopularPages. This configuration parameter was removed with MediaWiki 1.35.0.
  • $wgHitcounterUpdateFreq
    Sets how often page counters should be updated. Default value is 1.
  • $wgGroupPermissions['sysop']['hitcounter-exempt'] = true;
    Exclude user group page views from counting.

Fork

There is a fork of this extension that offers custom settings to the user:

See also