Page MenuHomePhabricator

CentralNotice: Adapt banner history for campaign fallback
Open, Needs TriagePublic4 Estimated Story Points


Banner history logs the campaign selected, banner displayed (if any), approximate time, and status code.

Prior to Campaign Fallback (T124969), only one campaign selection, and only one log entry, per pageview were possible.

Now, with that feature, more than one campaign may be chosen per pageview. So, now the banner history logs may also contain more than one entry per pageview, if more than one of the campaigns chosen has the banner history feature activated. However, the log won't indicate that both occurred entries come from the same pageview.

Also, if any of the chosen campaigns have banner history activated and cede the pageview to another lower-priority campaign without banner history activated, then the log won't register the lower-priority campaign selection and possible banner display. This also will paint an incomplete picture of what the user experienced on the pageview.

We probably should rethink the data structure for banner history and also adapt when CentralNotice runs the banner history code, so that the log registers more correctly the user's banner-related experience and the system's display decisions. The log should probably contain one entry per pageview, and something similar to the new campaignStatuses data point.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 23 2019, 3:29 PM
EYener added a subscriber: EYener.Jul 9 2020, 7:34 PM

Change 623314 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@master] WIP First attempt at fixing state and fallback

Change 623537 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@master] Add PostDisplayProcess hook, fix main banner history fallback issues

Change 623537 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Add FinalizeChooseAndMaybeDisplay hook, fix main banner history fallback issues