Rich-text Reply

Break consistency experience - force variations change - optimizelyBuckets cookie

mkcarlos 09-21-16

Break consistency experience - force variations change - optimizelyBuckets cookie

Hi 

 

Is there any way to control visitor recurrence to experiment's variations?

 

If there is a test placed on page A and some visitor access it and fall into variation #1, according to the OptimizelyBuckets cookie, that visitor will see the same variation next time he access again to that page A. (suposing that cookie has not been deleted or expired)

 

How can I change it, and 'leave free' visitors to fall into other variations (#2, #3) in case they came again to page A? (even if they have been previously bucketed to variation #1)

 

I know that visitor experience won't be consistent for this experiment, but it's a particular case I need to test.

Thank you in advance,

Regards,

Level 2

AllisonR 09-22-16
 

Re: Break consistency experience - force variations change - optimizelyBuckets cookie

Hi there,

 

Thanks for your question! You can overwrite the optimizelyBuckets cookie with the bucketVisitor API (described here). If you do not wish to use Optimizely's traffic allocation, you could write your own logic to randomly assign visitors to a variation and force their optimizelyBuckets cookie using this API call. This logic would need to be on the source code of your site before the Optimizely snippet.

 

Hope this helps!

Allison
Sr. Technical Support Engineer
Optimizely | EMEA
Optimizely
mkcarlos 09-22-16
 

Re: Break consistency experience - force variations change - optimizelyBuckets cookie

[ Edited ]

Thanks AllisonR,

 

As I have seen, I just have to place that code with a JS condition based on my needs into the page I want to run the experiment, for example:

 

 

var experimentId = 0123456789
var random = Math.random();
//Always 50%Control-50%Var#1 - regardless of traffic allocation, audience conditions, and url targeting.
if (random < 0.5) { window['optimizely'] = window['optimizely'] || []; window['optimizely'].push(["bucketVisitor", experimentId, 0]); } else { window['optimizely'] = window['optimizely'] || []; window['optimizely'].push(["bucketVisitor", experimentId, 1]); }

 

 

This way Optimizely will no make any assigment by its own, even if a visitor has previously seen the variation #1, next time he would have the same chances to fall into control or to variation #1 again. (due to the above JS that omit the optimizelyBuckets cookie). 

 

Right?

Level 2
inigam 09-23-16
 

Re: Break consistency experience - force variations change - optimizelyBuckets cookie


Hi

Just a note that using math.random();
One cannot assume/assure that using above 'if condition' it would be 50/50 allocation.
math.random will generate values mutually exclusive of previous random values.
(Correct me if am wrong, happy to learn)


if you want 50/50 allocation, one way could be to us the code in a new test with 50/50 allocation and
Control ie Original variation code being
window['optimizely'].push(["bucketVisitor", experimentId, 0]);

and Variation#1 code being
window['optimizely'].push(["bucketVisitor", experimentId, 1]);

You can put this in Experiment JS
window['optimizely'] = window['optimizely'] || [];

Hope you got the point.

Regards,
IN


Level 6