Page MenuHomePhabricator

AQS: add option to include all redirects for a page
Closed, DuplicatePublic

Description

It would be really nice if you could request pageview statistics for a page and all its redirects. For example, if you requested:
https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/all-access-with-redirects/user/Cat/daily/2016031200/2016033100
... it would return the aggregated pageviews for "Cat", "Felis domesticus", "Housecat", etc.

Note that the redirects API is limited to returning 500 redirects at a time, but that should be more than sufficient.

Event Timeline

Related question: When a person gets redirected to a page, does the pageview get recorded for the redirect, the target page, or both? I think it's only recorded for the redirect, but I want to double check with someone in Analytics to be sure.

To answer the second question, @kaldari, it depends. We don't have enough data in our system to figure out how to properly report statistics on redirects. We're working with Ori and others who are working on routing to fix this. For now I'm going to merge all the related tasks into T121912.