Problems with setting up tests
Hi, I am having several problems with setting up different kinds of tests. Often the tests looks correct in Optmizely Editing mode but when the test goes live it does not work. We have recently moved our site to a new version of EpiServer, I am wondering if that might be the problem? We have asked our developers if it is something in the code that effect the tests. According to them there should not be any problems.
Most of the time it's a race condition for when the code is running. If you're using Optimizely classic most custom code waits till domReady, but there is a very complex set of logic behind the scenes since Optimizely is installed in the <head> of the document but most elements don't exist till the <body>. That's the failure mode 90% of the time for experiment differences. Optimizely has a couple great doc resources on dev patterns to get around them and/or you can post a new question here w/ a URL and the code you're using: