mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-23 15:57:15 +00:00
New bucket for abtest data
Bug: T291308 Change-Id: I7aa47139e3fe552833798d6b8daacc1b30517915
This commit is contained in:
parent
259d826bdc
commit
fda6c3c117
|
@ -145,8 +145,8 @@ class Hooks implements
|
|||
'mw_version' => MW_VERSION,
|
||||
] + $data;
|
||||
|
||||
if ( $this->userOptionsLookup->getOption( $user, 'discussiontools-abtest' ) ) {
|
||||
$data['bucket'] = $this->userOptionsLookup->getOption( $user, 'discussiontools-abtest' );
|
||||
if ( $this->userOptionsLookup->getOption( $user, 'discussiontools-abtest2' ) ) {
|
||||
$data['bucket'] = $this->userOptionsLookup->getOption( $user, 'discussiontools-abtest2' );
|
||||
}
|
||||
|
||||
if ( $user->isAnon() ) {
|
||||
|
@ -193,7 +193,7 @@ class Hooks implements
|
|||
'user_editcount' => $editCount ?: 0,
|
||||
];
|
||||
|
||||
$bucket = $this->userOptionsLookup->getOption( $user, 'discussiontools-abtest' );
|
||||
$bucket = $this->userOptionsLookup->getOption( $user, 'discussiontools-abtest2' );
|
||||
if ( $bucket ) {
|
||||
$data['bucket'] = $bucket;
|
||||
}
|
||||
|
|
|
@ -83,8 +83,11 @@
|
|||
data.user_class = 'IP';
|
||||
}
|
||||
|
||||
if ( mw.user.options.get( 'discussiontools-abtest' ) ) {
|
||||
data.bucket = mw.user.options.get( 'discussiontools-abtest' );
|
||||
if ( mw.config.get( 'wgDiscussionToolsABTestBucket' ) ) {
|
||||
data.bucket = mw.config.get( 'wgDiscussionToolsABTestBucket' );
|
||||
if ( mw.config.get( 'wgDiscussionToolsAnonymousUserId' ) ) {
|
||||
data.anonymous_user_id = mw.config.get( 'wgDiscussionToolsAnonymousUserId' );
|
||||
}
|
||||
}
|
||||
|
||||
// Schema's kind of a mess of special properties
|
||||
|
@ -119,10 +122,13 @@
|
|||
integration: 'page',
|
||||
editor_interface: 'wikitext'
|
||||
};
|
||||
/* eslint-enable camelcase */
|
||||
if ( mw.user.options.get( 'discussiontools-abtest' ) ) {
|
||||
data.bucket = mw.user.options.get( 'discussiontools-abtest' );
|
||||
if ( mw.config.get( 'wgDiscussionToolsABTestBucket' ) ) {
|
||||
data.bucket = mw.config.get( 'wgDiscussionToolsABTestBucket' );
|
||||
if ( mw.config.get( 'wgDiscussionToolsAnonymousUserId' ) ) {
|
||||
data.anonymous_user_id = mw.config.get( 'wgDiscussionToolsAnonymousUserId' );
|
||||
}
|
||||
}
|
||||
/* eslint-enable camelcase */
|
||||
return data;
|
||||
} );
|
||||
|
||||
|
|
Loading…
Reference in a new issue