Using a test cookie audience condition to QA your experiment before setting it live
Test cookie audience conditions allow you to set an experiment live and view it, but scope it only to visitors that have the presence of the cookie - the rest of your traffic will remain unaffected by the experiment. This QA method does not override any conditions, so it’s helpful for checking that the intended url and audience conditions are working.
To set the test cookie you’ll just need to create a bookmark in your web browser. Edit the bookmark and change both its properties and set the “Name” property to “Test Cookie”, and the “URL” to this code:
Here's what it looks like in Chrome:
Now change the audience condition in the experiment you’d like to test. In the conditions section, drag Cookie into the Audience Conditions section, and then enter the name of our test cookie in the text box (i.e., 'optly_YOURDOMAINNAME_test'). So, if your URL was www.tastydesserts.com then the cookie name would looke like optly_tastydesserts_test. Don't forget to replace YOURDOMAINNAME with the correct domain.
Choose Has any value from the drop-down menu tells Optimizely to just check for the existence of this cookie. Once you have clicked “Apply”, “Save” and “Start Experiment” then you are ready to go!
Navigate to the targeted url, click the “Test Cookie” bookmark and refresh the page. You will now meet the audience conditions for the experiment, allowing you to QA it live without affecting the rest of your site.
Let me know how this works for you and if you have any other methods of QA. Also, check out my post on using Optimizely force variation parameters so you can easily see certain variations and how it looks on a specific screen/browser etc. This is another helpful way to QA.
Technical Support Engineer
Note: This message board prevents the bookmarklet code from displaying correctly. At the beginning of the line of code for the bookmarklet that sets the cookie, change the ":" to just a regular colon.
Analytics and Testing Guru