Page MenuHomePhabricator

[V1 experiment changes] Enable reliable measurement of account creation for mobile registration experiment on auth.wikimedia.org domain and support broader rollout
Closed, ResolvedPublic

Description

Summary:
We are running an experiment to improve the mobile account creation form on Special:CreateAccount (auth.wikimedia.org). However, the current Test Kitchen architecture prevents us from collecting instrumentation data for an experiment from both auth.wikimedia.org (where the user actually encounters the Special:CreateAccount form), and the origin wiki (where we would be able to record whether an account was actually created, and record metrics like constructive edit rate).

Background:

Hypothesis:
If we improve the account creation form, the registration completion rate among mobile users who land on the form will increase by at least 2% relative to the control group.

Current limitation:

  • The experiment runs on auth.wikimedia.org (Special:CreateAccount)
  • Account creation success is only recorded on the origin wiki
  • There is currently no reliable way to connect:
    • exposure to experiment variant (auth domain)
    • successful account creation & down-funnel contributor metrics (origin wiki)
Proposed approaches (to evaluate and implement):

Option A: Cross-domain experiment attribution

  • Pass experiment assignment (e.g., bucket + experiment name) from auth domain to the origin wiki during account creation flow
  • Persist this information (e.g., via request parameters, session, or temporary storage)
  • Log successful account creation events with experiment attribution

Option B: Server-side logging on account creation

  • Emit a structured event when an account is successfully created
  • Include:
    • experiment name
    • variant (control/treatment)
    • originating wiki (e.g., enwiki)
  • Requires propagating experiment assignment to the point of account creation

Option C: Metrics pipeline workaround (Prometheus/Grafana)

  • Track aggregate account creation counts correlated with experiment rollout
Example implementation pattern:

To target auth domain in TestKitchen UI and then check wgDBname for "enwiki" (for example) before using TK SDK, e.g.

PHP (server-side):

if ( $someTargetingCondition ) {
  // ^ needs to be consistent with the targeting check done client-side
  
  $experiment = ...

  if ( $experiment->isAssignedGroup( 'treatment' ) {
    // code for varying the form
  }
}

JS (client-side):

if ( someTargetingCondition ) {
  // ^ needs to be consistent with the targeting check done server-side
  
  const experiment = mw.testKitchen.getExperiment( EXPERIMENT_NAME );

  // user would have been shown control or treatment variation on this page load, as determined by server-side check
  experiment.sendExposure();
}
Acceptance Criteria:
  • We can measure total registrations or registration completion rate for control vs treatment
  • Experiment is restarted and can scale to a larger percentage of mobile traffic

Event Timeline

KStoller-WMF triaged this task as High priority.
KStoller-WMF moved this task from Inbox to Needs Estimation on the Growth-Team board.

Change #1267044 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/WikimediaEvents@master] Record TOR account creation failure separately

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

Let's move this into the sprint, because I'm defacto already actively working on this, just so far I labeled that work as part of T419916: [V1 experiment release] Redesign mobile web account creation form following Codex guidelines, but now maybe it can be more accurately done as part of this task here.

Change #1268605 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@master] stats: add counters for experiment account creation

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

KStoller-WMF renamed this task from [V1 experiment changes] Enable reliable measurement of account creation for mobile registration experiment on authwiki and support broader rollout to [V1 experiment changes] Enable reliable measurement of account creation for mobile registration experiment on auth.wikimedia.org domain and support broader rollout.Apr 7 2026, 6:16 PM
KStoller-WMF updated the task description. (Show Details)

Today, @mpopov, @MNeisler, @Sgs and I met to look into how implement the metrics with the new GrowthBook tool

In that meeting, this query for a fact table was created:

SELECT
  experiment.subject_id AS subject_id,
  MAX(timestamp) AS timestamp,
  SUM(IF(action = 'creation_attempt', 1, 0)) -
    SUM(IF(action = 'page_visit_with_error', 1, 0)) -
    SUM(IF(action = 'page_visit_without_form', 1, 0))
    AS potentially_successful_account_creation_count
FROM
  wmf_experiments.experiment_event_v1
WHERE
  timestamp BETWEEN from_iso8601_timestamp('{{ startDateISO }}') AND from_iso8601_timestamp('{{ endDateISO }}')
  AND experiment.enrolled LIKE '{{ experimentId }}'
  AND action IN('creation_attempt', 'page_visit_with_error', 'page_visit_without_form')
GROUP BY experiment.subject_id

Change #1268605 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] stats: add counters for experiment account creation

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

Change #1267044 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Record TOR account creation failure separately

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

Change #1270383 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.23] stats: add counters for experiment account creation

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

Change #1270384 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/WikimediaEvents@wmf/1.46.0-wmf.23] Record TOR account creation failure separately

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

Change #1270384 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@wmf/1.46.0-wmf.23] Record TOR account creation failure separately

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

Change #1270383 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.23] stats: add counters for experiment account creation

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

Mentioned in SAL (#wikimedia-operations) [2026-04-13T14:11:38Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1270384|Record TOR account creation failure separately (T422283)]], [[gerrit:1270383|stats: add counters for experiment account creation (T422283)]], [[gerrit:1269495|GrowthSuggestionToneCheck: flag as non-experimental (T422835)]]

Mentioned in SAL (#wikimedia-operations) [2026-04-13T14:13:16Z] <lucaswerkmeister-wmde@deploy1003> migr, lucaswerkmeister-wmde, urbanecm: Backport for [[gerrit:1270384|Record TOR account creation failure separately (T422283)]], [[gerrit:1270383|stats: add counters for experiment account creation (T422283)]], [[gerrit:1269495|GrowthSuggestionToneCheck: flag as non-experimental (T422835)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be

Mentioned in SAL (#wikimedia-operations) [2026-04-13T14:22:00Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1270384|Record TOR account creation failure separately (T422283)]], [[gerrit:1270383|stats: add counters for experiment account creation (T422283)]], [[gerrit:1269495|GrowthSuggestionToneCheck: flag as non-experimental (T422835)]] (duration: 10m 22s)

Change #1271723 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@master] fix: add missing hook registration for create account stats

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

Change #1271723 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] fix: add missing hook registration for create account stats

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

Change #1272712 had a related patch set uploaded (by Michael Große; author: Michael Große):

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.24] fix: add missing hook registration for create account stats

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

Change #1272712 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.46.0-wmf.24] fix: add missing hook registration for create account stats

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

Mentioned in SAL (#wikimedia-operations) [2026-04-16T14:12:23Z] <mlitn@deploy1003> Started scap sync-world: Backport for [[gerrit:1272712|fix: add missing hook registration for create account stats (T422283)]]

Mentioned in SAL (#wikimedia-operations) [2026-04-16T14:14:21Z] <mlitn@deploy1003> mlitn, migr: Backport for [[gerrit:1272712|fix: add missing hook registration for create account stats (T422283)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-04-16T14:18:30Z] <mlitn@deploy1003> Finished scap sync-world: Backport for [[gerrit:1272712|fix: add missing hook registration for create account stats (T422283)]] (duration: 06m 07s)

The experiment is finally running properly. QA itself is happening in a different task.