MediaWiki extensions manual
PageViewInfo
Release status: stable
Implementation MyWiki
Description Provides fancy looking graphs of Wikimedia page view data
Author(s) Kunal Mehta (Legoktmtalk)
Compatibility policy Snapshots releases along with MediaWiki. Master is not backward compatible.
MediaWiki 1.29+
PHP 5.5+
Database changes No
License GNU General Public License 3.0 or later
Download
Parameters
  • $wgPageViewApiMaxDays
  • $wgPageViewInfoWikimediaEndpoint
  • $wgPageViewInfoWikimediaRequestLimit
  • $wgPageViewInfoWikimediaDomain
Services defined
MediaWiki\Extensions\PageViewInfo\PageViewService
Hooks used
  • APIQuerySiteInfoGeneralInfo
  • ApiQuery::moduleManager
  • InfoAction
Quarterly downloads 36 (Ranked 134th)
Public wikis using 867 (Ranked 295th)
Translate the PageViewInfo extension if it is available at translatewiki.net
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.

Installation

  • Requires Graph extension if you want to see the fancy graphs
  • Download and place the file(s) in a directory called PageViewInfo in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'PageViewInfo' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


Vagrant installation:

  • If using Vagrant , install with vagrant roles enable pageviewinfo --provision

Local development

For local development, you can point the extension at Wikimedia production using the following additions to LocalSettings.php:

$wgPageViewInfoWikimediaDomain = "en.wikipedia.org";

When enabled, visiting MediaWiki?action=info on your local development server will show page views for the MediaWiki article on English Wikipedia rather than on your local site.

When the Graph extension is enabled, clicking the number of page views will open an overlay displaying a graph of page views.

API

Special:ApiHelp/query+pageviews Special:ApiHelp/query+siteviews Special:ApiHelp/query+mostviewed

Community Integration

Currently, PageViewService class is only implemented for the Wikimedia Pageview API in this extension. You must install an additional, community-maintained extension to use other data collection backend.

If you implemented your own PageViewService, please list it here.

See also

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.