mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 10:35:48 +00:00
Merge "Misnamed field on a/b test logging"
This commit is contained in:
commit
66feffb991
|
@ -42,7 +42,7 @@
|
|||
);
|
||||
}
|
||||
|
||||
function addABTestData( data ) {
|
||||
function addABTestData( data, addToken ) {
|
||||
// DiscussionTools New Topic A/B test for logged out users
|
||||
if ( !mw.config.get( 'wgDiscussionToolsABTest' ) ) {
|
||||
return;
|
||||
|
@ -54,8 +54,10 @@
|
|||
}
|
||||
var anonid = parseInt( tokenData.token.slice( 0, 8 ), 16 );
|
||||
data.bucket = anonid % 2 === 0 ? 'test' : 'control';
|
||||
if ( addToken ) {
|
||||
// eslint-disable-next-line camelcase
|
||||
data.anonymous_user_id = tokenData.token;
|
||||
data.anonymous_user_token = tokenData.token;
|
||||
}
|
||||
} else if ( mw.user.options.get( 'discussiontools-abtest2' ) ) {
|
||||
data.bucket = mw.user.options.get( 'discussiontools-abtest2' );
|
||||
}
|
||||
|
@ -213,7 +215,7 @@
|
|||
}
|
||||
/* eslint-enable camelcase */
|
||||
|
||||
addABTestData( event );
|
||||
addABTestData( event, true );
|
||||
|
||||
if ( trackdebug ) {
|
||||
log( topic, duration + 'ms', event );
|
||||
|
|
Loading…
Reference in a new issue