Hi MediaWiki API mailing list!
I have a question about how the pageview metrics for Wikimedia commons images accumulate– are they the total view count of that image anywhere, or just when embedded in commons?
More detail:
I'm working with WikiLovesAfrica on a project to calculate how many times each image has been viewed over a period of time, and I've been prototyping data collection using the following endpoint (with the mwviews.api https://github.com/mediawiki-utilities/python-mwviews/ PageviewsClient):
https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/commons.wiki... *IMAGE_FILENAME*/monthly/2014010100/2019011800
My assumption is that since commons images are hosted from the commons, the returned value will be the total view count of that image, wherever it is being embedded, including all wikis. Is that correct?
If it's not the across-wiki count, is there a way to get that across-wiki count?
All the best,
On Sun, Jan 20, 2019 at 6:51 AM J. Nathan Matias natematias@gmail.com wrote:
I have a question about how the pageview metrics for Wikimedia commons images accumulate– are they the total view count of that image anywhere, or just when embedded in commons?
They don't include either; those are pageview metrics. They will give you how often the image description page has been viewed. Media view metrics currently only exist in a raw dump format: https://wikitech.wikimedia.org/wiki/Analytics/Data_Lake/Traffic/Mediacounts There is an unofficial (and largely undocumented) API at https://tools.wmflabs.org/mediaviews-api/api/2 The task for having an official API is https://phabricator.wikimedia.org/T207208
mediawiki-api@lists.wikimedia.org