Extension:E3 Experiments/Testing

Check if the extension is live
To see if it's running, )
 * visit Special:Version on the appropriate wiki
 * in a console like Firebug, Firefox Tools > Web Developer > Web Console or Chrome(ium)'s ? console, enter variables like:
 * mw.activeCampaigns - a JSON structure of campaign info (maintained by ClickTracking extension. may includes Account Creation bucketing)
 * $.cookie('userbuckets')
 * to force a Post-Edit Feedback display, enter mw.experiments.showFeedback('Thanks for playing')
 * (different from the generic JS notification mw.util.jsMessage( 'This is something a message for the user ' );
 * you can print some MediaWiki info pushed to JS variables using mw.config.get mw.config.get(wgUserRegistration) mw:Manual:Interface/JavaScript lists variables you can print, extensions add more.


 * The extension relies upon the ClickTracking extension; to verify that is working in a console you can call
 * $.trackAction('my test string') to trigger a tracking event (generally an XMLHttpRequest posted to api.php)
 * $.getTrackedActions - returns a JSON structure of events that have fired, including the manual trigger above

Using dashboard.js

 * Developers
 * In extensions/E3Experiments, run grunt min which creates minified dist/dashboard.js Select this with pbcopy or xsel -b < dist/dashboard.js Navigate to Special:Preferences > Appearance > Custom JavaScript and paste it in


 * Users
 * Load the dashboard code by pulling testwiki:User:Ori_Livneh_(WMF)/dashboard.js into your own custom js, by adding the following line to testwiki:Special:Preferences > Appearance > Custom JavaScript

When you reload, you should see a Campaigns section in the left-hand navigation, and you should start seeing messages like these appear as you interact with the site:
 * (T+000) ClickTracking debug cookie set (expires in 7 days).
 * (T+000) tracked event "undefined"

The start and end times of activation and eligibility are driven by code in the extension, along with eligibility for the experiment &mdash; see ../Architecture.

If not, maybe it's your skin.

In a JavaScript console, look for mw.domlog (the function to write stuff out).

For post-edit feedback
Additionally, there are "magical" query string parameters that force certain internal checks to evaluate as true:

Tips
Many experiments are targeted to newly registered Wikipedia users. In a browser console, the MediaWiki variable for registration date is mw.config.get( 'wgRegistration' ) in UTC (London time, not local time). You can use the dashboard's Campaigns addition to put yourself in a user bucket.

When you see a hard-to-read collection of curly braces like try pasting just the part in curly braces through http://jsonlint.com. Even if the validator fails, it will format it nicely for you.

When you see URL-encoded text like %7B%22AccountCreation%22%3A%5B%22ACP3%22%2C1%5D%7D try pasting it into http://meyerweb.com/eric/tools/dencoder/ and clicking [Decode]. Or in a console, unescape("''paste string here") will approximate this.

Cookies
In the net panel of a debugger, inspect a request, you will see lots of cookies

Once someone is bucketed, he or she has the following cookies some set by other tests:

Interactions
Special:Preferences > Appearance > "Exclude me from feature experiments" checkbox...

Events/tracking don't seem to fire on pages in the Special namespace.