Page MenuHomePhabricator

Take page visibility (ex: page in non-visible tab) into account when reporting satisfaction schema checkin events
Closed, ResolvedPublic

Description

Currently our checkin events fire regardless of if the user can see the page or not (a background tab or a tab that it's contents are visible), this may end up reporting a user on a page much longer than they actually are.

We could use the pagevisibility[1] api's to get a more accurate view on the time a user is looking at the page.

[1] http://caniuse.com/#feat=pagevisibility

Event Timeline

Restricted Application added projects: Discovery, Discovery-Search. · View Herald TranscriptSep 8 2016, 6:24 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
debt updated the task description. (Show Details)Sep 8 2016, 10:14 PM
debt triaged this task as Normal priority.Sep 8 2016, 10:16 PM
debt moved this task from needs triage to This Quarter on the Discovery-Search board.
debt added a subscriber: mpopov.
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptSep 8 2016, 10:19 PM

From the looks of it, page visibility API is specifically for browsers that have tabs. Currently, when a user opens multiple pages from the search results page, each of those is firing off "Hey, I'm alive!" check-in events, even when not in focus.

It would be great if the timer that fires off those check-in events could pause/freeze when the tab is not in focus (invisible) and resume/unfreeze when the tab is in focus (visible). That way we only get "hey, I'm alive" events from an opened search result when the user has that tab in focus.

Change 311844 had a related patch set uploaded (by EBernhardson):
Take page visibility into account for search checkins

https://gerrit.wikimedia.org/r/311844

Change 311844 merged by jenkins-bot:
Take page visibility into account for search checkins

https://gerrit.wikimedia.org/r/311844

debt closed this task as Resolved.Oct 7 2016, 9:12 PM
debt added a subscriber: debt.

This was released the week of Oct 4 2016 on the train (after the week of no production pushes)