Trợ giúp về API MediaWiki

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

meta=siteviews (pvis)

(main | query | siteviews)
  • Mô đun này cần quyền đọc.
  • 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.

Các tham số:
Other general parameters are available.
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 which ones are supported, under pageviewservice-supported-metrics / module name (siteviews, mostviewed, etc.)

pageviews
Plain pageviews.
uniques
Unique visitors.
Một trong các giá trị: pageviews, uniques
Default: pageviews
pvisdays

The number of days to show.

Type: integer
The value must be between 1 and 60.
Default: 60
Các ví dụ:
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]