Rich-text Reply

How to handle bucket versions/original for customer

Mr-BS 06-02-16

How to handle bucket versions/original for customer

Hi guys,

just thought about the following scenario:

I created an experiment and let the customer check this too. Maybe with the preview or with the force paramater or even he is abel to set the cookie, but I think a lot of customers are not able to create the cookie.

Okay, testing is fine experiment can start....awesome :-) (remove the cookie from audience or duplicate experiment, depends on).

The customer is maybe still in a variation but don't want this anymore. For myselfe it´s easy to use the optimizely.bucketVisitor() in the console to put me to origin.


But wat is the best way to do that fpr the customer.

Exclude him based on the set cookie from the audience?

But what if he has not set the test cookie?


Level 2

CouchPsycho 06-03-16

Re: How to handle bucket versions/original for customer

[ Edited ]

How about:

a) provide two links which put him in a specific bucket with the optimizely_x{experimentID}={variationID}

or, if too complicated for your customer

b) set up a specific simple html page with those links and additionally explaining the characteristics of the variation or even the hypothesis behind it.

Details see here:
Kind regards


Kind regards


Mr-BS 06-10-16

Re: How to handle bucket versions/original for customer

Hey Michael,

I think this works fine for an A/B test. But with an Multipage test the customer can´t run the whole funnel with the force parameter.

So in this case, how can I force the customer in a variation with less effort for him?

Level 2
robertchan 06-10-16

Re: How to handle bucket versions/original for customer

You should set the cookie if it's not yet present then depending on your conditions, remove a cookie for users who have hit a certain condition.


You can use the following code for all your condtions:


setCookie = function (c_name,value,exdays) {
    var exdate=new Date();
    exdate.setDate(exdate.getDate() + exdays);
    var expires = exdate.toUTCString();
    var isIE8 = (document.documentMode !== undefined);
    if (exdays == 0) {
        expires = (isIE8 == true) ? "" : "0";
    var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+expires);
    document.cookie=c_name + "=" + c_value;

getCookie = function(cname) {
    var name = cname + "=";
    var ca = document.cookie.split(';');
    for(var i=0; i<ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1);
        if (c.indexOf(name) != -1) return c.substring(name.length,c.length);
    return "";

deleteCookie = function(name) {
  document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';

//Check a cookie
if (getCookie('visited')) {
} else {
    setCookie('visited','true', 999); //999 days expiration

The section following //Check a cookie shows how you could apply the logic I suggested.

Robert Chan

Experimentation Hero
mminshew 06-13-16

Re: How to handle bucket versions/original for customer


   Another thought might be setting the test to run against your clients ip address. if the customer has a static ip you might try creating an audience containing just his ip address. That way he just needs to login to a computer on that network. I haven't tried this myself but it might be worth considering. 

Michael Minshew,
Learning something new every day.

Level 5