Reading Time: 2 minutes

woman-at-laptop

Here’s a quick reference for five query parameters you can append to your site’s URL in order to preview, QA and debug your Optimizely experiments.

1. Preview a specific variation

Add this to your URL: ?optimizely_xEXPERIMENTID=VARIATIONINDEX

What it does: This query parameter will force variation ‘VARIATIONINDEX’ of experiment ‘EXPERIMENTID’ to activate. It doesn’t matter if the experiment is running. It’s great for previewing variations so you can QA layout and design.

You won’t be able to verify that your goals are firing as they should, though, because goals are not enabled in preview mode. To do that …

2. Force goal tracking in preview mode

Add this to your URL: ?optimizely_force_tracking=true

What it does: As hinted above, this query parameter will cause goals to fire when you’re previewing a variation. It’s a quick way to QA goals without having to do a test cookie launch.

3. Disable all Optimizely experiments on a page

Add this to your URL: ?optimizely_disable=true

What it does: This is the other side of the coin — if your experiment is running and you want a peek at what a page looks like with no experiments activated, this query parameter will get you there. It only works on a single page, though. If you want to turn off Optimizely for your entire site, read on.

4. Disable all Optimizely experiments on a site

Add this to your URL: ?optimizely_opt_out=true

What it does: This query parameter sets a cookie that prevents any Optimizely experiment from activating on the domain in question. If you’re troubleshooting issues with your site, opening an incognito window and disabling Optimizely with this parameter is a quick and easy way to determine whether any of your A/B tests are causing the problem.

5. See a log of Optimizely events

Add this to your URL: ?optimizely_log=true

What it does: This pushes an extremely verbose log to your browser’s console. Here you can find Optimizely chatter about audience condition evaluation, experiment activation, and bucketing into variations. It’s handy for troubleshooting issues with experiments that don’t activate as expected — just use your console’s search functionality to find messages containing the experiment ID you’re interested in, and the log will tell you everything you ever wanted to know. And much, much more. For detailed info on the Optimizely log, see the official reference here. And if you’re tired of appending query parameters to URLs, sifting through logs, and stretching_your_pinky_finger to reach_the_underscore_key, get in touch. We can help 🙂