Page MenuHomePhabricator

Enhancement: Automatically suppress CTAs if Central Notice banner showing
Closed, ResolvedPublic

Description

Feature request: as a reader, when I am presented a Central Notice message, I prefer not to see other similar calls to action such as mobile beta enrollment.

This is a technical task to observe Central Notice software architecture (e.g., a JavaScript variable, event, or the like) to determine when Central Notice messages are running, and to suppress, for example, beta enrollment CTAs, without the need for a configuration SWAT deploy.

To help explain temporary gaps in CTA response volume, it may be necessary to send an Event Logging event to indicate when such an eligible CTA was suppressed. However, most large scale CN campaigns may be well known, so this additional Event Logging may not be useful.

Event Timeline

dr0ptp4kt raised the priority of this task from to Needs Triage.
dr0ptp4kt updated the task description. (Show Details)
dr0ptp4kt added a project: QuickSurveys.
dr0ptp4kt moved this task to Backlog on the QuickSurveys board.
dr0ptp4kt subscribed.
dr0ptp4kt renamed this task from Do not show QuickSurveys if Central Notice campaigns running to Do not interject CTAs if Central Notice campaigns running.Dec 10 2015, 12:31 AM
dr0ptp4kt updated the task description. (Show Details)
dr0ptp4kt added a project: MobileFrontend.
dr0ptp4kt set Security to None.
dr0ptp4kt added subscribers: AndyRussG, awight.

@AndyRussG: @awight suggested there may be a simple JavaScript variable for making the appropriate client side determination of whether Central Notice banners are being displayed. Any quick pointers?

dr0ptp4kt renamed this task from Do not interject CTAs if Central Notice campaigns running to Do not interject CTAs if Central Notice banner showing.Dec 10 2015, 12:33 AM

I'm confused.. is this a bug or a feature request i.e. is this causing a problem now (it shouldn't be - All quick surveys should be disabled (beta enrollment also)).

Thanks for checking. It's a feature. In the case of QS, I realized the originally requested feature already had a task T109699: Don't show QuickSurveys if there's a fundraising banner.. I'll thus remove the QS tag and revise the Description.

I agree the disabled configs should shield us for the time being. This is more future proofing against future collisions.

dr0ptp4kt renamed this task from Do not interject CTAs if Central Notice banner showing to Automatically suppress CTAs if Central Notice banner showing.Dec 10 2015, 5:16 AM
dr0ptp4kt updated the task description. (Show Details)
dr0ptp4kt removed a project: QuickSurveys.
Jdlrobson renamed this task from Automatically suppress CTAs if Central Notice banner showing to Enhancement: Automatically suppress CTAs if Central Notice banner showing.Dec 10 2015, 5:27 PM

phew :) Just got me worried! Does CentralNotice provide mechanisms? Some general mechanism to disable experimental features across the site might be useful.

The beta optin banner can be disabled just like QuickSurveys can and I see no problem with this just being part of our process (making sure experiments do not run as part of December) so not 100% sure we'd need this (ideally MobileFrontend should be agnostic about whether CentralNotice is running).

Technically, Central Notice messages/banners can run at any time, but December fundraising has the biggest impact.

During standup today, this bug was prioritized to Low. @JKatzWMF indicated based on discussion yesterday with @jhobs, @atgo et al, there may be a general solution for Q4 FY 2015-2016 (April-June, 2016) where CN targeting could help drive these different sorts of CTAs (presumably avoiding collisions).

phew :) Just got me worried! Does CentralNotice provide mechanisms? Some general mechanism to disable experimental features across the site might be useful.

Yes, I'm told!

The beta optin banner can be disabled just like QuickSurveys can and I see no problem with this just being part of our process (making sure experiments do not run as part of December) so not 100% sure we'd need this (ideally MobileFrontend should be agnostic about whether CentralNotice is running).

I prefer a defensive programming approach, but agree it's probably not a huge deal today as long as we are careful to have no drops. Per the other comment between your comment and this one, for the remainder of the major fundraising season (December 2015) the current configuration management implementation and approach seems sufficient, the thinking being that in Q4 maybe there's an even more elegant solution that can be leveraged.

Many apologies for not having kept this on my radar and taking so long to reply!! There is indeed a simple JavaScript way of checking whether a banner is shown:

if ( mw.centralNotice && ( mw.centralNotice.getDataProperty( 'status' ) === 'banner_shown' ) ) {
    ...

While there are still a few edge cases where this may give a false positive (specifically, CentralNotice thought the banner was shown, but in-banner JavaScript actually hid it) it should be pretty reliable.

Jdlrobson claimed this task.

The mobile web beta call to action is currently disabled by config. I think this is a better approach to turning on/off banners/quick surveys and this is sufficient.