Extension:PageViewInfo
| PageViewInfo Release status: beta |
|||
|---|---|---|---|
| Implementation | MyWiki | ||
| Description | Provides fancy looking graphs of Wikimedia page view data | ||
| Author(s) | Kunal Mehta (Legoktmtalk) | ||
| Compatibility policy | release branches | ||
| MediaWiki | 1.27+ | ||
| PHP | 5.5+ | ||
| Database changes | No | ||
| License | GNU General Public License 3.0 or later | ||
| Download | |||
| Example | bf-wmpageview.wmflabs.org | ||
|
|||
|
|||
|
|||
| Translate the PageViewInfo extension if it is available at translatewiki.net | |||
| Check usage and version matrix. | |||
| Vagrant role | pageviewinfo | ||
| Issues | Open tasks · Report a bug | ||
The PageViewInfo extension provides API modules to access pageview-related data and adds fancy looking graphs to the "Page information" interface.
It does not do any data collection or storage itself; it relies on the PageViewService class which needs to be implemented for each data collection backend. (Currently it is only implemented for the Wikimedia Pageview API.)
Installation[edit]
- If using Vagrant, install with
vagrant roles enable pageviewinfo --provision
- Manual installation
- Requires Graph extension if you want to see the fancy graphs
- Download and place the file(s) in a directory called
PageViewInfoin yourextensions/folder.
- Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'PageViewInfo' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
API[edit]
prop=pageviews (pvip)
- This module requires read rights.
- Source: PageViewInfo
- License: GPL-3.0-or-later
Shows per-page pageview data (the number of daily pageviews for each of the last pvipdays days).
The result format is page title (with underscores) => date (Ymd) => count.
- pvipmetric
The metric to use for counting views. Depending on what backend is used, not all metrics might be supported. You can use the siteinfo API (action=query&meta=siteinfo) to check, under pageviewservice-supported-metrics / <module name>
- pageviews
- Plain pageviews.
- One of the following values: pageviews
- Default: pageviews
- pvipdays
The number of days to show.
- The value must be between 1 and 60.
- Type: integer
- Default: 60
- pvipcontinue
When more results are available, use this to continue.
- Show pageview statistics for the main page.
- api.php?action=query&titles=Main_Page&prop=pageviews [open in sandbox]
meta=siteviews (pvis)
- This module requires read rights.
- Source: PageViewInfo
- License: GPL-3.0-or-later
Shows sitewide pageview data (daily pageview totals for each of the last pvisdays days).
The result format is date (Ymd) => count.
- pvismetric
The metric to use for counting views. Depending on what backend is used, not all metrics might be supported. You can use the siteinfo API (action=query&meta=siteinfo) to check, under pageviewservice-supported-metrics / <module name>
- pageviews
- Plain pageviews.
- uniques
- Unique visitors.
- One of the following values: pageviews, uniques
- Default: pageviews
- pvisdays
The number of days to show.
- The value must be between 1 and 60.
- Type: integer
- Default: 60
- Show sitewide pageview totals.
- api.php?action=query&meta=siteviews [open in sandbox]
- Show sitewide unique visitor totals.
- api.php?action=query&meta=siteviews&pvismetric=uniques [open in sandbox]
list=mostviewed (pvim)
- This module requires read rights.
- This module can be used as a generator.
- Source: PageViewInfo
- License: GPL-3.0-or-later
Lists the most viewed pages (based on last day's pageview count).
- pvimmetric
The metric to use for counting views. Depending on what backend is used, not all metrics might be supported. You can use the siteinfo API (action=query&meta=siteinfo) to check, under pageviewservice-supported-metrics / <module name>
- pageviews
- Plain pageviews.
- One of the following values: pageviews
- Default: pageviews
- pvimlimit
The number of pages to return.
- No more than 500 (5,000 for bots) allowed.
- Type: integer or max
- Default: 10
- pvimoffset
When more results are available, use this to continue.
- Type: integer
- Default: 0
- List the top 10 pages.
- api.php?action=query&list=mostviewed [open in sandbox]
- Show pageview data for each of the top 10 pages.
- api.php?action=query&generator=mostviewed&prop=pageviews [open in sandbox]
| This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |