Page MenuHomePhabricator

Recommended Reading exp: Align Reader pageview metric for control
Open, HighPublic1 Estimated Story Points

Description

Background

In de-1-3-1-specialhomepage-onboarding-ab-test, the event welcome_survey_account_setup_motivation_saved uses different action_context values per group:

  • Treatment (AccountSetup): reading, editing, both, skipped
  • Control (Welcome Survey): the raw reason answer, e.g. read; no event when skipped

So readers in control can't be identified the same way as readers in treatment.

Goal

Make the control group send the same action_context values as the treatment group.

Welcome Survey reference: P7829

Acceptance criteria for done

  • Control maps reason to reading, editing, other or skipped.
    • read → reading
    • edit-typo, edit-info-add-change, add-image, new-page, program-participant → editing
    • no answer (placeholder) → skipped
  • Control sends the event with skipped when the survey is skipped.
  • PHPUnit tests cover the mapping and the skip case.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1347673 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/extensions/GrowthExperiments@master] instrument(WelcomeSurvey): align motivation event with AccountSetup

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

Change #1347673 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] instrument(WelcomeSurvey): align motivation event with AccountSetup

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

Change #1347712 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/extensions/GrowthExperiments@wmf/1.47.0-wmf.22] instrument(WelcomeSurvey): align motivation event with AccountSetup

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

Change #1347712 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.47.0-wmf.22] instrument(WelcomeSurvey): align motivation event with AccountSetup

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

Mentioned in SAL (#wikimedia-operations) [2026-10-01T20:14:28Z] <cjming@deploy1003> Started scap sync-world: Backport for [[gerrit:1347606|fix(ReadingRecommendations): Update button style to primary (T436332)]], [[gerrit:rEDOI13477127b80e|instrument(WelcomeSurvey): align motivation event with AccountSetup (T439887)]], [[gerrit:1347743|instrument(AccountSetup): Record setup motivation on page_visit (T439217)]]

Mentioned in SAL (#wikimedia-operations) [2026-10-01T20:18:22Z] <cjming@deploy1003> cjming, volker-e: Backport for [[gerrit:1347606|fix(ReadingRecommendations): Update button style to primary (T436332)]], [[gerrit:rEDOI13477127b80e|instrument(WelcomeSurvey): align motivation event with AccountSetup (T439887)]], [[gerrit:1347743|instrument(AccountSetup): Record setup motivation on page_visit (T439217)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can

Mentioned in SAL (#wikimedia-operations) [2026-10-01T20:32:57Z] <cjming@deploy1003> Finished scap sync-world: Backport for [[gerrit:1347606|fix(ReadingRecommendations): Update button style to primary (T436332)]], [[gerrit:rEDOI13477127b80e|instrument(WelcomeSurvey): align motivation event with AccountSetup (T439887)]], [[gerrit:1347743|instrument(AccountSetup): Record setup motivation on page_visit (T439217)]] (duration: 18m 28s)

Change #1348834 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/extensions/WikimediaEvents@master] instrument(AccountSetup): expose motivation data for control

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

Change #1348834 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] instrument(AccountSetup): expose motivation data for control

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

Change #1350233 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/extensions/WikimediaEvents@wmf/1.47.0-wmf.22] instrument(AccountSetup): expose motivation data for control

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

Change #1350233 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@wmf/1.47.0-wmf.22] instrument(AccountSetup): expose motivation data for control

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

Mentioned in SAL (#wikimedia-operations) [2026-10-05T11:42:58Z] <lucaswerkmeister-wmde@deploy1003> Started scap sync-world: Backport for [[gerrit:1350233|instrument(AccountSetup): expose motivation data for control (T439887)]]

Mentioned in SAL (#wikimedia-operations) [2026-10-05T12:01:19Z] <lucaswerkmeister-wmde@deploy1003> volker-e, lucaswerkmeister-wmde: Backport for [[gerrit:1350233|instrument(AccountSetup): expose motivation data for control (T439887)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-10-05T12:38:24Z] <lucaswerkmeister-wmde@deploy1003> Finished scap sync-world: Backport for [[gerrit:1350233|instrument(AccountSetup): expose motivation data for control (T439887)]] (duration: 55m 26s)

Tested on https://test.wikipedia.org/wiki/Special:WelcomeSurvey - all mapping for a control group (with Special:WelcomeSurvey) seem to be correct:

mw.testKitchen.overrideExperimentGroup( 'de-1-3-1-specialhomepage-onboarding-ab-test', 'control' );

This is just an example of events when selecting a reason on Special:WelcomeSurvey that falls into editing:

de-1-3-1-specialhomepage-onboarding-ab-test: The enrollment for this experiment has been overridden. The following event will not be sent:
 welcome_survey_account_setup_started
de-1-3-1-specialhomepage-onboarding-ab-test: The enrollment for this experiment has been overridden. The following event will not be sent:
 click {
  "funnel_entry_token": "58aa4123e6790e6b52c2",
  "element_friendly_name": "WelcomeSurvey/AccountSetup save button"
}
de-1-3-1-specialhomepage-onboarding-ab-test: The enrollment for this experiment has been overridden. The following event will not be sent:
 page_visit {
  "action_source": "internal_referrer",
  "action_context": "{\"user_motivation\":\"editing\"}"
} {
  "agent": {
    "client_platform": "mediawiki_js",
    "client_platform_family": "mobile_browser"
  },
  "page": {
    "namespace_id": -1
  }
}
de-1-3-1-specialhomepage-onboarding-ab-test: The enrollment for this experiment has been overridden. The following event will not be sent:
 welcome_survey_account_setup_ready {
  "action_context": "{\"ready_ms\":444}"
}
  • "Other" motivation option is recorded as a separate event from "skipped"
de-1-3-1-specialhomepage-onboarding-ab-test: The enrollment for this experiment has been overridden. The following event will not be sent:
 page_visit {
  "action_source": "internal_referrer",
  "action_context": "{\"user_motivation\":\"other\"}"
} {
  "agent": {
    "client_platform": "mediawiki_js",
    "client_platform_family": "mobile_browser"
  },
  "page": {
    "namespace_id": -1
  }
}