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} 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

Gilles created this task.May 29 2018, 1:23 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 29 2018, 1:24 PM

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 claimed this task.Jun 1 2018, 11:57 AM
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

Gilles added a parent task: Restricted Task.Jun 1 2018, 2:00 PM

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".

Gilles added a subscriber: Ejegg.Sep 6 2018, 12:07 PM

@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:

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

Gilles moved this task from Blocked or Needs-CR to Doing on the Performance-Team board.

@Peter, @Gilles, looks great!!! :)

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

Gilles closed this task as Resolved.Oct 4 2018, 10:14 AM