Rich-text Reply

Placing optmizely snippet into a hidden div

Nicole 11-07-16

Placing optmizely snippet into a hidden div

Having the snippet on the page is causing issues in the background for my company's website, namely a large white block that pushes content down the page when viewed with as a googlebot.

 

One of the suggestions from my dev team is placing the snippet in a hidden div.  I was curous if anyone knew if that would be solution to the problem or if there were other things that could work invtead. 

Level 2

robertchan 11-08-16
 

Re: Placing optmizely snippet into a hidden div

The hidden div doesn't seem like the best solution. Your snippet needs to be placed as high up in the head as possible after your meta tags. I don't see how you can put a div into your head. If you must place the snippet into your body then your trade off will be page flashing. I'd say an alternative would be if you have a tag manager, try triggering the snippet to fire in the head as early as possible.
Robert Chan

Experimentation Hero