Page MenuHomePhabricator

Build proof of concept for mobile donate A/B test
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

Following the success of our desktop test, it's now time for us to do the same on mobile! Since the desktop proof of concept was celebrated as something that made subsequent work easier, and as there are a couple of differences between the mobile version of this experiment and the desktop one, let's make another proof of concept to ensure that we understand the engineering work entailed in this experiment!

User story

As an engineer on the Reader Experience team, I want to feel as prepared as possible to begin development on the mobile version of the donate A/B test

Requirements

As much of the infrastructure of doing an experiment like this has been proven out, I'd like us to focus our efforts on making sure to answer the open questions:

all other features should be regarded as optional and dealer's choice

BDD

  • For QA engineer to fill out

Test Steps

  • For QA engineer to fill out

Design

image.png (1×720 px, 111 KB)

Acceptance criteria

  • a proof of concept patch has been created in gerrit, which answers the above questions
  • code need not be perfect or finalized (don't worry about variable/function names for now), but it should work end-to-end to demonstrate how an engineer could set up this mobile experiment without additional unforeseen challenges

Communication criteria - does this need an announcement or discussion?

None required beyond sprint updates

Rollback plan

The proof of concept should not be merged nor mergeable, so no worries about rollback plan here

Event Timeline

SToyofuku-WMF renamed this task from [DRAFT] Build proof of concept for mobile donate A/B test to Build proof of concept for mobile donate A/B test.Aug 19 2025, 7:19 PM
SToyofuku-WMF triaged this task as High priority.
SToyofuku-WMF updated the task description. (Show Details)
SToyofuku-WMF updated the task description. (Show Details)
SToyofuku-WMF moved this task from Incoming to Needs refinement on the Reader Experience Team board.
SToyofuku-WMF set the point value for this task to 5.Aug 25 2025, 6:52 PM

I'm seeing 5s

A note that Jon has raised using geoIP might not be as easy as we suspected, because it seems like the cookie might only be set for central notice? Other proposed directions include https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat and https://wikitech.wikimedia.org/wiki/Geolocation. Either way, pay close attention to whether your approach would potentially introduce a performance cost and focus on proving out whether this is doable or not, and how easy it is

Change #1184182 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/WikimediaMessages@master] POC - Mobile donate banner, with currency localisation

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

to test with GeoIP, add a cookie in your browser:

document.cookie = "GeoIP=US:NY:New_York:40.75:-74.00:v4; path=/";

Change #1184188 had a related patch set uploaded (by LorenMora; author: LorenMora):

[mediawiki/extensions/WikimediaEvents@master] POC - Instrument mobile donate AB test experiment

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

While working on this we discovered that the currency conversion library used to convert the "$2.75" amount would introduce a substantial performance hit. In the POCs above, we hard coded the amount for this figure, copying the approach of the portals, but we're exploring different options, such as changing the copy or excluding this dollar amount.
We also ran into some issues with how instrumentation will work with the 'checkbox hack' implementation that's used to open the MinervaNeue menu, but managed to overcome that by starting the instrument on the checkbox input change event.

Change #1184182 abandoned by Aude:

[mediawiki/extensions/WikimediaMessages@master] POC - Mobile donate banner, with currency localisation

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