Page MenuHomePhabricator

Account creation: recurring donor control page
Closed, ResolvedPublic

Description

In T293698, we created a custom landing page for the recurring donor campaign. We also want to have a "control" page that does not have custom content. We'll put this link in half the emails, and this will help us determine whether the customization of the landing page has any impact on whether people actually create an account upon landing on the page.

To do this, we want to use the status quo Special:CreateAccount page shown below. But we do need the URL parameters to send the user to Growth features and to keep track of the data.

Graphic: none (use status quo)
Header: none (use status quo)
Body: none (use status quo)
Destination: after account creation, all users go straight to Special:Homepage (geEnabled=1)
Campaign: growth-recurring-english-control-2021

image.png (1×2 px, 1 MB)

Event Timeline

We currently have this code:

// The campaign field should always be set if this special page is loaded (see onSpecialPage_initList
		// in VariantHooks), but adding this check for additional safety in case the SpecialPge_initList is moved
		// around in the future.
		$donorHtml = $this->isCampaign() ? $this->getDonorHtml() : '';

So I think we need to adjust this to check for a variable like "isControl" (either part of the campaign URL or a new query parameter) and show/hide the donor HTML accordingly.

Showing this HTML block is the only thing isCampaign() is used for. We can just pick a campaign parameter for which it will return false, and achieve the same result.

The current campaign pattern is growth-advancement-<language>-2021, we can just use growth-advancement-control-<language>-2021 instead.

Showing this HTML block is the only thing isCampaign() is used for. We can just pick a campaign parameter for which it will return false, and achieve the same result.

The current campaign pattern is growth-advancement-<language>-2021, we can just use growth-advancement-control-<language>-2021 instead.

We have code in VariantHooks.php that does this though:

if ( self::isGrowthDonorCampaign( $context ) ) {
	$this->userOptionsManager->setOption( $user, self::GROWTH_CAMPAIGN, $this->getCampaign( $context ) );
}

and I assume we still want to store the campaign for the user.

Similarly, we need to update the code for onBeforeWelcomeCreation so that the user in the "control" landing page but with GrowthExperiments features enabled will go straight to Special:Homepage and skip the welcome survey

if ( self::isGrowthDonorCampaign( $context ) ) {
	$context->getOutput()->redirect( SpecialPage::getSafeTitleFor( 'Homepage' )->getFullUrlForRedirect() );
}

Change 737378 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/core@master] LoginSignup: Add function for overriding benefits container

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

Change 737381 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] CreateAccountCampaign: Show/hide new HTML based on query param

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

With the patches applied:

/wiki/Special:CreateAccount?campaign=growth-recurring-english-control-2021&geEnabled=1&geNewLandingHtml=0

grafik.png (1×1 px, 747 KB)

/wiki/Special:CreateAccount?campaign=growth-recurring-english-2021&geEnabled=1&geNewLandingHtml=1

grafik.png (1×1 px, 1015 KB)

The determining factor for whether the new landing HTML is shown is the query parameter geNewLandingHtml, not the name of the campaign. The campaign name is stored with the user account, though, so the URLs should be set up with as follows:

  • ?campaign=growth-recurring-english-control-2021&geNewLandingHtml=0&geEnabled=1 Growth features are enabled, the landing page HTML is the default content provided by MediaWiki core, and the user will have growth-recurring-english-control-2021 stored in their preferences for later analysis
  • ?campaign=growth-recurring-english-2021&geNewLandingHtml=1&geEnabled=1Growth features are enabled, the landing page HTML is the new design provided by GrowthExperiments extension, and the user will have growth-recurring-english-2021 stored in their prefeferences for later analysis

Change 737378 merged by jenkins-bot:

[mediawiki/core@master] LoginSignup: Add function for overriding benefits container

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

Change 737381 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] CreateAccountCampaign: Show/hide new HTML based on query param

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

Change 737960 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@wmf/1.38.0-wmf.7] CreateAccountCampaign: Show/hide new HTML based on query param

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

Change 737961 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/core@wmf/1.38.0-wmf.7] LoginSignup: Add function for overriding benefits container

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

Change 737961 merged by jenkins-bot:

[mediawiki/core@wmf/1.38.0-wmf.7] LoginSignup: Add function for overriding benefits container

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

Change 737960 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.38.0-wmf.7] CreateAccountCampaign: Show/hide new HTML based on query param

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

Mentioned in SAL (#wikimedia-operations) [2021-11-11T12:28:58Z] <kharlan@deploy1002> Synchronized php-1.38.0-wmf.7/includes/specialpage/LoginSignupSpecialPage.php: Backport: [[gerrit:737961|LoginSignup: Add function for overriding benefits container (T295068)]] (duration: 00m 57s)

Mentioned in SAL (#wikimedia-operations) [2021-11-11T12:46:04Z] <kharlan@deploy1002> Synchronized php-1.38.0-wmf.7/extensions/GrowthExperiments/includes/HomepageHooks.php: Backport: [[gerrit:737960|CreateAccountCampaign: Show/hide new HTML based on query param (T295068) (1/2 HomepageHooks.php)]] (duration: 00m 54s)

Mentioned in SAL (#wikimedia-operations) [2021-11-11T12:47:19Z] <kharlan@deploy1002> Synchronized php-1.38.0-wmf.7/extensions/GrowthExperiments/includes/Specials/SpecialCreateAccountCampaign.php: Backport: [[gerrit:737960|CreateAccountCampaign: Show/hide new HTML based on query param (T295068) (2/2 SpecialCreateAccountCampaign.php)]] (duration: 00m 55s)

Change 738213 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[operations/mediawiki-config@master] GrowthExperiments: Add campaign pattern for control group

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

Change 738213 merged by jenkins-bot:

[operations/mediawiki-config@master] GrowthExperiments: Add campaign pattern for control group

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

Mentioned in SAL (#wikimedia-operations) [2021-11-11T13:00:25Z] <kharlan@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:738213|GrowthExperiments: Add campaign pattern for control group (T295068)]] (duration: 00m 55s)

kostajh added a subscriber: Etonkovidova.

The URLs are live on enwiki:

@Etonkovidova could you please do QA on this tomorrow / early next week? Thanks!

The URLs are live on enwiki:

@Etonkovidova could you please do QA on this tomorrow / early next week? Thanks!

Checked earlier (forgot to update the task promptly). Seems to be working as expected.

MMiller_WMF renamed this task from Donors to newcomers: recurring donor control page to Account creation: recurring donor control page.Feb 5 2022, 2:38 AM