Page MenuHomePhabricator

Spike: Investigate feasibility of opting existing accounts into the "saved pages" beta feature
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

For users in the treatment group who already have an account but are logged-out, if they click the bookmark and view the dialog CTA, they may click "log in" and log into their account. Given this is a signal they want to use the ReadingLists feature, we need to opt them into the beta feature.


Requirements

Technical requirements

There are 2 things we need to achieve:

  1. We need to target users in the treatment group who have an account. This means they will have clicked "log in" from the CTA dialog in the experimental UI.
  2. We need to opt those users into the "Saved pages" beta feature on login.

Some ideas:

@Jdlrobson suggested the onLocalUserCreated hook to set a preference for a new user, like so:

public function onLocalUserCreated( $user, $isAutoCreated ) {  
        $campaign = RequestContext::getMain()->getRequest()->getText( 'campaign' );  
        if ( str_starts_with( $campaign, '..' ) ) {  
            $donorCampaign = explode( '-  
            $this->userOptionsManager->setOption(  
                $user,  
                'readlistin',  
                0  
            );  
        }

We could use the onUserLoginComplete hook in a similar fashion. This still leaves the issue of targeting the right users, though.

We could also consider doing something similar to what we will do to track account creations - see T422177, which details how the Growth team has approached this.

@Jdlrobson also mentioned that there's a way to tell that an account was created via the watchstar CTA - maybe we could use that for inspiration.

Acceptance criteria

  • Determine how we can opt existing accounts who click the "log in" CTA from the bookmark button into the ReadingLists beta feature
  • Document the approach here or in a proof of concept

This task was created by Version 1.0.0 of the Reader Experience team task template using phabulous.

Event Timeline

AnneT triaged this task as High priority.Apr 20 2026, 7:14 PM
AnneT set the point value for this task to 3.
AnneT moved this task from Incoming to Ready for sprint on the Reader Experience Team board.

Timebox to a 3

AnneT lowered the priority of this task from High to Medium.Apr 21 2026, 5:34 PM

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

[mediawiki/extensions/ReadingLists@master] POC - Opt-in use to ReadingLists when they login via Account Creation CTA

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

Proof of concept patch that uses the UserLoginCompleteHook:

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ReadingLists/+/1277725

In the Account Creation CTA dialog, this adds a url param:

returntoquery: 'readingListsLoginCta=1'

In the onUserLoginComplete hook handler, this checks for readingListsLoginCta in the $returnToQueryArray. If the user has not explicitly set the beta feature preference yet, then this sets the preference to opt the user in.

@aude thanks for proving this out! Locally, I found that my existing account was opted into the beta feature if I was logged out centrally. However, if I was already logged in centrally, I was not opted in - perhaps UserLoginCompleteHook doesn't run in that case?

IMO this is complete; @aude has proved out a way to do this if we want to that may need a little tweaking to work with users who are already logged in centrally. Moving to signoff!

Jdlrobson-WMF subscribed.

Awesome! Glad we found a path forward!

Change #1277725 abandoned by Aude:

[mediawiki/extensions/ReadingLists@master] POC - Opt-in use to ReadingLists when they login via Account Creation CTA

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