Extension:HitCounters
リリースの状態: 安定 |
|
|---|---|
| 実装 | データベース, データ抽出, 自分のウィキ |
| 説明 | ページビュー機能の提供 |
| 作者 | Mark A. Hershberger (MarkAHershbergerトーク) |
| 最新バージョン | 0.4 |
| MediaWiki | >= 1.43.0 |
| PHP | 7.3.19+ |
| データベースの変更 | はい |
| Composer | mediawiki/hit-counters |
|
|
|
hitcounter-exempt |
|
| ライセンス | GNU 一般公衆利用許諾書 3.0 以降 |
| ダウンロード | |
| translatewiki.net で翻訳を利用できる場合は、HitCounters 拡張機能の翻訳にご協力ください | |
| Vagrant role | hitcounters |
| 問題点 | 未解決のタスク · バグを報告 |
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, which was released in May 2015.
概要
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 concerning 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. 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. It also does not use third-party services and has no dependencies that can cause conflicts. Other extensions can cause problems during a Composer update.
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 made lighter to speed up processing time. Many lines of superfluous code were removed. Also, the old MediaWiki core code performed numerous database queries on every page hit; these have all been removed. This change may lead to some inaccuracies in the data.
The core differences that wiki administrators need to know are:
- The hit counts are stored in the cache.
- The visible hit count at the bottom of each page is updated only once daily. (Pages with a hit count of less than 100 are updated once per minute.)
- That hit is ignored if you refresh your browser on a wiki page.
何をもって閲覧とするか
According to tests conducted by several MediaWiki operators, a view is counted if a page is accessed (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, action=info.
Migration
インストール
- ダウンロードして、ファイルを
extensions/フォルダー内のHitCountersという名前のディレクトリ内に配置します。
開発者とコード寄稿者は、上記の代わりに以下を使用してGitからインストールします:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/HitCounters
- 以下のコードを LocalSettings.php ファイルの末尾に追加します:
wfLoadExtension( 'HitCounters' );
- 更新スクリプトを実行します。このスクリプトは、この拡張機能が必要とするデータベーステーブルを自動的に作成します。
- 必要に応じて設定します。
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
Vagrantでのインストール:
- Vagrantを使用している場合は、
vagrant roles enable hitcounters --provisionでインストールしてください。
注:
設定
| Name | Description | Default |
|---|---|---|
| $wgDisableCounters | When set to true, it disables the notice in the pages footer saying このページは 256 回閲覧されました。 as well as the Special:PopularPages.
|
false
|
| $wgHitcounterUpdateFreq | Sets how often page counters should be updated. | 1
|
$wgEnableAddPageId
|
When set to true, it adds the PageId to the special page "PopularPages".
|
false
|
$wgEnableAddTextLength
|
When set to true, it adds the TextLength to the special page "PopularPages".
|
false
|
$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_38-v0.5.7 is backward compatible with MediaWiki 1.38.0.
See also
- Extension:Analytics - Gives access to traffic and edit analytics for the entire wiki, as well as for specific categories and pages
- Extension:WSStats - Page statistics and parser functions and Lua modules to display statistical information
| この拡張機能は以下のウィキ ファーム/ウィキ ホスト/パッケージに含まれています: |
- Stable extensions/ja
- Database extensions/ja
- Data extraction extensions/ja
- Personalization extensions/ja
- Extensions supporting Composer/ja
- Extensions which add rights/ja
- AbuseFilter-builder extensions/ja
- AbuseFilter-computeVariable extensions/ja
- AbuseFilter-deprecatedVariables extensions/ja
- AbuseFilter-generateTitleVars extensions/ja
- LoadExtensionSchemaUpdates extensions/ja
- MagicWordwgVariableIDs extensions/ja
- PageViewUpdates extensions/ja
- ParserFirstCallInit extensions/ja
- ParserGetVariableValueSwitch extensions/ja
- SkinAddFooterLinks extensions/ja
- SpecialStatsAddExtra extensions/ja
- GPL licensed extensions/ja
- Extensions in Wikimedia version control/ja
- All extensions/ja
- Extensions included in BlueSpice/ja
- Extensions included in MyWikis/ja
- Statistics extensions/ja
- Special page extensions/ja
