Rich-text Reply

Not distributing experiment

euschen 10-14-15

Not distributing experiment

Hello everyone, 

 

we are trying to get our page work with optimizely. The main problem is that the experiment preview with https://domain/?optimizely_xID=1 does not show any changes, so that we cannot verify our experiment. I started the optimizely logger and in the end it shows the message "Not distributing experiment ID (already in plan). What does this message mean?

 

 

Kind regards, Eugen

Level 1

JDahlinANF 10-14-15
 

Re: Not distributing experiment

[ Edited ]

"Optimizely / Distributor / Not distributing experiment ..." means that you are already in the experiment so it does not need to randomize you into a variation.

If your project allows for force parameters to work and you can share the production URL, we can look at what may be causing experiment 3617470036 to not run.

euschen 10-15-15
 

Re: Not distributing experiment

Hi nap0leon, 

 

Thank you for your reply! You can find the project (with experiment) here:  

https://ifrs-staging.herokuapp.com/?optimizely_x3617470036=1

 

Kind regards

Eugen

Level 1
JDahlinANF 10-15-15
 

Re: Not distributing experiment

@euschen

Using the link you provided, sometimes I see the changes, sometimes I don't.

That usually means there is a race condition going on.

 

For example, for the lines of code where you are updating the html of an element, that element must exist before you can update the html.  When the optimizely code runs faster than the page loads, that element is not ready to be updated so the selector does not find any matching elements and therefore the element is not updated.

 

For issues like this, you can usually get around it by prefixing all of your CSS selectors with "window.", like this:

window.$(".publisher-content p").html("<strong>Demnächst:</strong><br> Direkter Zugriff auch auf passgenau eingebundene Fachinhalte <br>- ganz ohne zeitaufwendige Recherche!");

The same applies to the .css() method.

 

Give it a try where you change all your $('...') to window.$('...') and see if that fixes it for you.

JDahlinANF 10-15-15
 

Re: Not distributing experiment

Follow-up:

For the HTML changes, you *have* to wait until the item is in the DOM to make the change - which means the user may see the text flash from the original to the new.

 

For CSS changes, we can get around this delay by creating a <style> block that contains the necessary style changes and insert it into the HEAD right away by using the following technique:

 

/* _optimizely_evaluate=force */
$('head').prepend('<style>.cat-hero-wrapper {display:none !important;}</style>');
/* _optimizely_evaluate=safe */

Since CSS does not support the eq() method, you'd need to convert it to "nth-child()" logic.