Page MenuHomePhabricator

Research Spike: How do redirects affect pageviews [8 pts] {hawk}
Closed, ResolvedPublic

Description

Joseph and I were looking at the article titles in the intermediate hourly aggregate. We asked ourselves and didn't know the answer to: what happens when a request goes through redirects like:

/wiki/Something%20Notable
/wiki/Something Notable
/wiki/Something_Notable

or similarly

/index.php?title=Something%20Notable
/index.php?title=Something Notable
/index.php?title=Something_Notable

We want the title to be the same in all cases, simply Something_Notable. But we also don't want duplicate requests and I've always been confused about how client side / server side redirects are handled in all these cases.

Furthermore, I'm wondering if any other transformations are applied to titles besides the s/ /_/g transformation.

Event Timeline

Milimetric raised the priority of this task from to Needs Triage.
Milimetric updated the task description. (Show Details)
Milimetric added a project: Analytics-Backlog.
Milimetric subscribed.
Milimetric triaged this task as Medium priority.Aug 13 2015, 5:30 PM
Milimetric set Security to None.
Milimetric moved this task from Incoming to Prioritized on the Analytics-Backlog board.

I think that someone should run an analysis where we compare titles in the log to titles in the page table and review those that don't match. Doing this, we can get a good sense for the proportion of titles that should have matched but didn't and we can probably spot any remaining bugs.

JAllemandou renamed this task from Double check Article Title normalization to Research Spike: Article Title normalization contains weird chars.Nov 23 2015, 5:59 PM
JAllemandou renamed this task from Research Spike: Article Title normalization contains weird chars to Research Spike: Article Title normalization contains weird chars [8 pts] {hawk}.
JAllemandou moved this task from Prioritized to Tasked on the Analytics-Backlog board.

Related task confirming that redirect logic is a bit of a ball of spaghetti: T104755

mforns edited projects, added: Analytics-Kanban; removed: Analytics.
mforns moved this task from Next Up to In Progress on the Analytics-Kanban board.

I wrote a page in Wikitech commenting the conclusions I drew:
https://wikitech.wikimedia.org/wiki/Analytics/Data/Redirects
Please, any comments are welcome.

mforns renamed this task from Research Spike: Article Title normalization contains weird chars [8 pts] {hawk} to Research Spike: How do redirects affect pageviews [8 pts] {hawk}.Jan 27 2016, 5:17 PM

@Nuria @mforns: just checking in on the scope of this, the ticket is about exploring and documenting issues and possible solutions, not settling on one, correct? There has been quite some interest in the research community on how to handle pageviews for article-level redirects (like these), see for example this paper. What's the next step?

I'll jump in without being addressed. I think the basic consensus is that the problem of redirects is too deeply woven into mediawiki for analytics to be able to solve it on their own. So for now we'll try to tag everything we can with page_id and encourage that practice. For example, one solution could be that when page A redirects to page B, the request to page A has a page_id = B.id, and a redirecting = true flag in X-Analytics.

@DarTar
Sorry, I overlooked your comment.

the ticket is about exploring and documenting issues and possible solutions, not settling on one, correct?

Yes :]

There has been quite some interest in the research community on how to handle pageviews for article-level redirects (like these), see for example this paper.

Precisely. If you look at https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/en.wikipedia/all-access/user/Barack_Obama/daily/2016010100/2016010100, you'll see that redirect page "Barack obama" (lower-case o) has more pageviews than the real page. Redirect pages highly impact pageviews stats today, because we don't handle them.

@Milimetric +1 Those approaches sound very reasonable to me. I can see how I would be able to use them to solve for my needs when doing analyses.