Variation is not run when optimizely snippet is loaded from cache
I'm on the free plan. Using the code editor I've inserted this:
/* _optimizely_evaluate=force */ window.optimizely_loaded = true; console.log('variation loaded');
I've directed all traffic to this variation. After I reload the page window.optimizely.data.state shows that the experiment is enabled and active, and the above variation is running.
However window.optimizely_loaded is not set, and I don't get any log in console.
The snippet is loaded synchronously. What I'm observing is that whenever optimizely snippet is loaded from browser cache, the experiment never runs, otherwise it always runs. Any idea?
Thanks for reaching out to Optiverse!
Please have a look at following knowledge base article. This gives you a good overview of the Optimizely data object and log.
Using optimizely.activeExperiments and optimizely.variationNamesMap helps you identifying if your experiment is currently running (active) and which variation you are bucketed into.
optimizely.push('log') gives you acces to Optimizely's log data.
Please check again and let me know if the outcome while using optimizely.activeExperiments is the same.
EMEA | Amsterdam