Index: trunk/extensions/Vector/modules/ext.vector.sectionEditLinks.js |
— | — | @@ -8,11 +8,16 @@ |
9 | 9 | if ( bucket === null ) { |
10 | 10 | // Percentage chance of being tracked |
11 | 11 | var odds = Math.min( 100, Math.max( 0, |
12 | | - Number( mw.config.get( 'wgVectorSectionEditLinksLotteryOdds', 0 ) ) |
| 12 | + Number( mw.config.get( 'wgVectorSectionEditLinksLotteryOdds', 0 ) ) |
13 | 13 | ) ); |
14 | 14 | // 0 = not tracked, 1 = tracked with old version, 2 = tracked with new version |
15 | 15 | bucket = ( Math.random() * 100 ) < odds ? Number( Math.random() < 0.5 ) + 1 : 0; |
16 | 16 | $.cookie( 'ext.vector.sectionEditLinks-bucket', bucket ); |
| 17 | + // If we are going to track this person from now on, let's also track which bucket we put |
| 18 | + // them into and when |
| 19 | + if ( bucket > 0 && 'trackActionWithInfo' in $ ) { |
| 20 | + $.trackActionWithInfo( 'ext.vector.sectionEditLinks-bucket', bucket ); |
| 21 | + } |
17 | 22 | } |
18 | 23 | } |
19 | 24 | if ( bucket ) { |