mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-24 00:06:49 +00:00
Merge "Log the DiscussionTools a/b test bucket for relevant schemas"
This commit is contained in:
commit
ef5c29c5f1
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue