Doc: add debug tips for AB testing

Change-Id: I46eff8ebf5ea10a14b9a203fc5dbe7e37d0f25a1
This commit is contained in:
Stephen Niedzielski 2018-06-28 10:30:23 -05:00 committed by Jdlrobson
parent f1a1edcd27
commit 4bf2156a2e

View file

@ -113,6 +113,22 @@ test have an equal chance of entering bucket "A" or "B", the remaining users fal
0.05 - would run test on 5% of users (2.5% in A, 2.5% in B, 95% in control).
0 would disable the test and place all users in "control".
Group assignment is universal no matter how many tests are running since both
`wgMinervaABSamplingRate` and `mw.user.sessionId()` are globals.
Group membership can be debugged from the console via:
```js
const AB = mw.mobileFrontend.require('skins.minerva.scripts/AB')
new AB(
'WME.PageIssuesAB',
mw.config.get( 'wgMinervaABSamplingRate', 0 ),
mw.user.sessionId()
).getBucket()
```
And since session ID is an input in calculating the group, reassignment occurs
when clearing it: `mw.storage.session.remove('mwuser-sessionId')`.
* Type: `Number`
* Default: `0`