Rich-text Reply

How to validate the excluded audiences are not part of the test before making the test live

sgurram 03-23-16
Accepted Solution

How to validate the excluded audiences are not part of the test before making the test live

We are having an optimizely test targeting to a specific audience pool with certain conditions like exclude SEM,promocodes .Now how do I validate that  these audiences are being excluded from test before I make  my test live.

Level 2

JasonDahlin 03-23-16
 

Re: How to validate the excluded audiences are not part of the test before making the test live

@sgurram - A couple ways to do this:

 

1- Set up a version of your experiment that runs in your QA environment and turn it live.  If you want to verify that the test does not run for users with certain promocodes or SEM campaign codes in the URLs, simply enter those parameters in your URLs in your QA environment and verify that the experiment is not running.

 

2- Add a "Custom Audience" that requires a test cookie.  Set the cookie manually on your machine, turn the experiment on and verify that it works.  You will be the only one in the experiment, you can test all entriy points, URL param, etc.  Once satisfied that the criteria are working as expected, remove the cookie based custom audience from the experiment.  More info on how to do this can be found here: https://help.optimizely.com/hc/en-us/articles/201876450#cookies

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
sgurram 03-23-16
 

Re: How to validate the excluded audiences are not part of the test before making the test live

I end up getting a Invalid URL while trying to set up a cookie as outlined here https://community.optimizely.com/t5/Developers/Using-a-test-cookie-audience-condition-to-QA-your-exp...
Level 2
JasonDahlin 03-23-16
 

Re: How to validate the excluded audiences are not part of the test before making the test live

[ Edited ]

The issue with @Lyndsey's article is that this message board adds some HTML encoding to the posts...

 

At the beginning of the bookmarklet's code, change the ":" to just a regular colon.

I've tried typing in the correct format 5 times and it keeps changing a regular colon to :

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
sgurram 03-23-16
 

Re: How to validate the excluded audiences are not part of the test before making the test live

Hi Jason

 

I dont see a difference between what was posted in @Lyndsey 's article and the one you posted below

I see the same  text javascript:

 

Can you please point me to the difference here

 

Thanks

Level 2
JasonDahlin 03-23-16
 

Re: How to validate the excluded audiences are not part of the test before making the test live

@sgurram - I edited my post 5 times trying to get it to display correctly.  It won't.  Change the : at the beginning to a regular colon.

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
sgurram 03-23-16
 

Re: How to validate the excluded audiences are not part of the test before making the test live

I tried it by changing the ";" to ":" but still get the same error.this is what I tried to bookmark
Is this what u meant?

javascript&colonSmiley Sadfunction(){ var hostname = window.location.hostname; var parts = hostname.split("."); var publicSuffix = hostname; var last = parts[parts.length - 1]; var expireDate = new Date(); expireDate.setDate(expireDate.getDate() + 7); var TOP_LEVEL_DOMAINS = ["com", "local", "net", "org", "xxx", "edu", "es", "gov", "biz", "info", "fr", "gr", "nl", "ca", "de", "kr", "it", "me", "ly", "tv", "mx", "cn", "jp", "il", "in", "iq"]; var SPECIAL_DOMAINS = ["jp", "uk", "au"]; if(parts.length > 2 && SPECIAL_DOMAINS.indexOf(last) != -1){ publicSuffix = parts[parts.length - 3] + "."+ parts[parts.length - 2] + "."+ last} else if(parts.length > 1 && TOP_LEVEL_DOMAINS.indexOf(last) != -1) {publicSuffix = parts[parts.length - 2] + "."+ last} document.cookie = "optly_"+publicSuffix.split(".")[0]+"_test=true; domain=."+publicSuffix+"; path=/; expires="+expireDate.toGMTString()+";"; })();
Level 2
JasonDahlin 03-23-16
 

Re: How to validate the excluded audiences are not part of the test before making the test live

You need to change

:

 

to just a regular colon

 

See this screen shot:

http://pasteboard.co/2uhID8QN.png

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
sgurram 03-23-16
 

Re: How to validate the excluded audiences are not part of the test before making the test live

Thanks for the screenshot..that helped
Level 2