Page MenuHomePhabricator

Track when a CentralNotice banner was displayed to the user in NavTiming
Closed, ResolvedPublic

Description

I don't think we record that information right now and it can effect performance perception quite a bit to have the late-loading banner.

Ideally we wouldn't just track that the user was targeted by a banner, but also the time when it was displayed to the user.

This will be particularly useful in the context of T187299: User-perceived page load performance study where we will be able to verify if the late appearance of a banner pushing down content negatively affects user sentiment about performance.

Event Timeline

The extra data point ("a CentralNotice banner was shown") could be one of various data points to collect to help guess a probable cause for the (perceived) slower load time. This relates to T181956 which also intends to collect extra data for higher load times.

We may want to consider creating a separate beacon for this and other data that we'd fire from the study and/or from the oversampling case. E.g. something like "PageLoadBreakdown" or some such. There may also be something salvageable from T186295.

For CentralNotice, it should be pretty simple to set up a hook to run for this (or some similar mechanism). :)

@AndyRussG Would mw.centralNotice.isBannerShown() give us the value that we want?

Gilles triaged this task as Medium priority.Jun 1 2018, 12:06 PM

Change 436792 had a related patch set uploaded (by Gilles; owner: Gilles):
[mediawiki/extensions/CentralNotice@master] Add performance mark for when banner is inserted

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

Change 436792 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Add performance mark for when banner is inserted

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

Vvjjkkii renamed this task from Track when a CentralNotice banner was displayed to the user in NavTiming to b3baaaaaaa.Jul 1 2018, 1:07 AM
Vvjjkkii removed Gilles as the assignee of this task.
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from b3baaaaaaa to Track when a CentralNotice banner was displayed to the user in NavTiming.Jul 2 2018, 1:52 PM
CommunityTechBot assigned this task to Gilles.
CommunityTechBot lowered the priority of this task from High to Medium.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.

Hmmm I'm targeted by a WLM banner right now and I'm not seeing the performance mark...

My code doesn't seem to be running on enwiki? @AndyRussG Are new versions of CentralNotice not deployed automatically via the train like the rest of MediaWiki extensions? Special:Version on enwiki states "2.6.0 (6492626) 20:21, 6 May 2018".

@Ejegg when is the next CentralNotice deployment scheduled? If not scheduled or far in the future, is there any chance this particular change could be backported to production? It's extremely low risk: https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/CentralNotice/+/436792/1/resources/subscribing/ext.centralNotice.display.js

@Gilles Apologies for the delay... Is it ok with you if this goes on next week's deployment train? (Also replied to your e-mail... Apologies again!!!)

Yes, next train is totally fine, thanks!

Change 461151 had a related patch set uploaded (by AndyRussG; owner: Gilles):
[mediawiki/extensions/CentralNotice@wmf_deploy] Add performance mark for when banner is inserted

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

Change 461151 merged by AndyRussG:
[mediawiki/extensions/CentralNotice@wmf_deploy] Add performance mark for when banner is inserted

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

It looks like this has been merged but left un deployed on the wmf.20 branch?

Change 461485 had a related patch set uploaded (by AndyRussG; owner: Gilles):
[mediawiki/extensions/CentralNotice@wmf_deploy] Add performance mark for when banner is inserted

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

Change 461485 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@wmf_deploy] Add performance mark for when banner is inserted

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

Mentioned in SAL (#wikimedia-operations) [2018-09-20T19:12:25Z] <thcipriani@deploy1001> Synchronized php-1.32.0-wmf.22/extensions/CentralNotice/resources/subscribing/ext.centralNotice.display.js: SWAT: [[gerrit:461485|Add performance mark for when banner is inserted]] T195840 (duration: 00m 51s)

This is now live. From the enwiki main page:

Capture d'écran 2018-09-20 21.27.18.png (206×707 px, 37 KB)

Next step is to capture the mark and record it in NavigationTiming data (or in a new schema linked to navtiming via pageviewToken).

Change 463113 had a related patch set uploaded (by Gilles; owner: Gilles):
[mediawiki/extensions/NavigationTiming@master] Record mwCentralNoticeBanner in CentralNoticeTiming

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

Change 463113 merged by jenkins-bot:
[mediawiki/extensions/NavigationTiming@master] Record mwCentralNoticeBanner in CentralNoticeTiming

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