@ianthekid – I believe this is to avoid the (in)famous “flicker of content”. By loading it early (render blocking) they try to minimize/avoid that the user see the original version before it’s changed to a variation.
So yes, there’s definitely a reason 🙂
Hello @ianthekid
Thank you for the post. As @michaelkjeldsen mentioned there is a method to our madness 🙂
You are correct that a best practice is to load JS at the bottom of the page. However the way that Optimziely works is to load in all of the information about what is going to change on the page. This way as the page loads when elements become available in the DOM we can change it immediately without the user seeing a flash of the original content. If we placed the snippet at the bottom of the page, the user would see the original content, our snippet would load with the information about what has changed, then we would make the change. It would not be a good experience for the user.
For more info on proper snippet placement and why, you can visit our knowledge base article here: https://help.optimizely.com/hc/en-us/articles/200040095
Feel free to respond with any other questions you might have!