Rozšíření:HitCounters
HitCounters Stav rozšíření: stabilní |
|
---|---|
Zavádění | Databáze , Extrakce dat, MyWiki |
Popis | Poskytuje funkci zobrazení stránek |
Napsal(i) | Mark A. Hershberger (MarkAHershbergerdiskuse) |
Nejnovější verze | 0.4 |
MediaWiki | >= 1.36.0 |
PHP | 7.3.19+ |
Změny v databázi | Ano |
Composer | mediawiki/hit-counters |
Tabulky | hit_counter hit_counter_extension |
Licence | GNU General Public License 3.0 nebo pozdější |
Zdrojový kód | |
|
|
hitcounter-exempt |
|
Čtvrtletní stahování | 129 (Ranked 51st) |
Přeložte rozšíření HitCounters, používá-li lokalizaci z translatewiki.net | |
Vagrant role | hitcounters |
Problémy | Otevřené úkoly · Nahlásit chybu |
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 .
Obecné informace
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 .
Rozdíly od základní implementace MediaWiki
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.
Co se počítá jako zobrazení
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
Instalace
K instalaci tohoto rozšíření můžete použít tvůrce spuštěním následujících dvou příkazů v adresáři MediaWiki:
- Stáhněte soubor/y a vložte je do adresáře pojmenovaného
HitCounters
ve vaší složceextensions/
.
Vývojáři a přispěvatelé kódu by si místo toho měli nainstalovat rozšíření from Git pomocí:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HitCounters - Na konec vašeho souboru LocalSettings.php přidejte následující kód:
wfLoadExtension( 'HitCounters' );
- Spusťte aktualizační skript, který automaticky provede všechny nezbytné databázové změny, jaké rozšíření vyžaduje.
- Configure as required.
- Dokončeno – Přejděte na stránku Special:Version vaší wiki a zkontrolujte, zda bylo rozšíření úspěšně nainstalováno.
Instalace Vagrant:
- Pokud používáte Vagrant , instalujte s těmito parametry
vagrant roles enable hitcounters --provision
Konfigurace
$wgDisableCounters
- When set to
true
, it disables the notice in the pages footer saying "Stránka byla zobrazena 256krát." as well as the special pagePopularPages
. This configuration parameter was removed with MediaWiki 1.35.0.
- When set to
$wgHitcounterUpdateFreq
- Sets how often page counters should be updated. Default value is
1
.
- Sets how often page counters should be updated. Default value is
$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:
- REL1_25-v0.5.4 is backward compatible to MediaWiki 1.25.0.
- REL1_35-v0.5.5 is backward compatible to MediaWiki 1.35.3.
- REL1_38-v0.5.5 is backward compatible to MediaWiki 1.38.0.
See also
- Extension:GoogleAnalyticsMetrics - Provides site-wide metrics for Google Analytics users
Toto rozšíření je zahrnuto v následujících wiki farmách/hostitelích a/nebo balíčcích: Toto není autoritativní seznam. Některé wiki farmy/hostitelé a/nebo balíčky mohou toto rozšíření obsahovat, i když zde nejsou uvedeny. Pro potvrzení se vždy obraťte na své wiki farmy/hostitele nebo balíček. |
- Stable extensions/cs
- Database extensions/cs
- Data extraction extensions/cs
- Personalization extensions/cs
- Extensions supporting Composer/cs
- GPL licensed extensions/cs
- Extensions in Wikimedia version control/cs
- Extensions which add rights/cs
- AbuseFilter-builder extensions/cs
- AbuseFilter-computeVariable extensions/cs
- AbuseFilter-deprecatedVariables extensions/cs
- AbuseFilter-generateTitleVars extensions/cs
- LoadExtensionSchemaUpdates extensions/cs
- MagicWordwgVariableIDs extensions/cs
- PageViewUpdates extensions/cs
- ParserFirstCallInit extensions/cs
- ParserGetVariableValueSwitch extensions/cs
- SkinAddFooterLinks extensions/cs
- SpecialStatsAddExtra extensions/cs
- All extensions/cs
- Extensions included in BlueSpice/cs
- Extensions included in MyWikis/cs
- Extensions included in WikiForge/cs
- Statistics extensions/cs
- Special page extensions/cs