Compare commits

...

2 Commits

Author SHA1 Message Date
Clare Ming 62e84e7467 Prevent A/B test enrollment hook from firing for unsampled
Bug: T297662
Change-Id: Ibeca32a3c0fab7de403d69ea274c653cf4bd6c0e
(cherry picked from commit 60553ff324)
2021-12-14 18:43:51 +00:00
Clare Ming a19bc4ce4a Update A/B test enrollment name
Bug: T292587
Change-Id: Ib4174119e18496139bb942032a2401ebc4d1849f
2021-12-09 13:58:17 -07:00
3 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
* Example A/B test configuration for sticky header:
*
* $wgVectorABTestEnrollment = [
* 'name' => 'vector.sticky_header_2021_11',
* 'name' => 'vector.sticky_header',
* 'enabled' => true,
* 'buckets' => [
* 'unsampled' => [
@ -101,7 +101,7 @@ function isInTestGroup( bucket, targetGroup ) {
function initAB( bucket ) {
// Send data to WikimediaEvents to log A/B test initialization if experiment is enabled
// and if the user is logged in.
if ( ABTestConfig.enabled && !mw.user.isAnon() ) {
if ( ABTestConfig.enabled && !mw.user.isAnon() && bucket !== 'unsampled' ) {
// @ts-ignore
mw.hook( 'mediawiki.web_AB_test_enrollment' ).fire( getABTestGroupExperimentName() );

View File

@ -12,7 +12,7 @@ const
USER_MENU_ID = 'p-personal',
VECTOR_USER_LINKS_SELECTOR = '.vector-user-links',
SEARCH_TOGGLE_SELECTOR = '.vector-sticky-header-search-toggle',
STICKY_HEADER_EXPERIMENT_NAME = 'vector.sticky_header_2021_11';
STICKY_HEADER_EXPERIMENT_NAME = 'vector.sticky_header';
/**
* Copies attribute from an element to another.

View File

@ -378,7 +378,7 @@
},
"VectorWebABTestEnrollment": {
"value": {
"name": "vector.sticky_header_2021_11",
"name": "vector.sticky_header",
"enabled": false,
"buckets": {
"unsampled": {