Merge "Log the DiscussionTools a/b test bucket for relevant schemas"

This commit is contained in:
jenkins-bot 2021-02-01 17:08:45 +00:00 committed by Gerrit Code Review
commit ef5c29c5f1
2 changed files with 13 additions and 1 deletions

View file

@ -64,6 +64,10 @@ class WikiEditorHooks {
'mw_version' => MW_VERSION,
] + $data;
if ( $user->getOption( 'discussiontools-abtest' ) ) {
$data['bucket'] = $user->getOption( 'discussiontools-abtest' );
}
if ( $user->isAnon() ) {
$data['user_class'] = 'IP';
}

View file

@ -84,6 +84,10 @@
data.user_class = 'IP';
}
if ( mw.user.options.get( 'discussiontools-abtest' ) ) {
data.bucket = mw.user.options.get( 'discussiontools-abtest' );
}
// Schema's kind of a mess of special properties
if ( data.action === 'init' || data.action === 'abort' || data.action === 'saveFailure' ) {
data[ actionPrefix + '_type' ] = data.type;
@ -106,7 +110,7 @@
logEditFeature = sampledLogger( 'VisualEditorFeatureUse', function ( inSample, feature, action ) {
/* eslint-disable camelcase */
return {
var data = {
feature: feature,
action: action,
editingSessionId: editingSessionId,
@ -117,6 +121,10 @@
editor_interface: 'wikitext'
};
/* eslint-enable camelcase */
if ( mw.user.options.get( 'discussiontools-abtest' ) ) {
data.bucket = mw.user.options.get( 'discussiontools-abtest' );
}
return data;
} );
function logAbort( switchingToVE, unmodified ) {