4.2K members online now
4.2K members online now
Everything you need to know about setting up Optimize including creating your account and container, linking to Google Analytics and how to tag your site.
Guide Me

Page hiding snippet not stopping 'flicker'

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭


i installed the scripts according to the recommended way with GTM that should avoid flickering at its best: https://support.google.com/360suite/optimize/answer/7359264

a/b testing is working but i can clearly see the original page load first then the variant, i.e. flickering.


the scripts are placed as up on the head tag as it is possible with my theme/plugin for inserting scripts. wouldn't know how to do that better actually.


no idea what i am doing wrong. you can check it out here: http://www.metabolic4you.ch.


thanks a lot for your help. 




1 Expert replyverified_user
Marked as Best Answer.
Accepted by topic author Cesare M

Page hiding snippet not stopping 'flicker'

Google Employee
# 2
Google Employee

Looks like the problem is due to a comment line that you have added in the <style> element of the page hiding snippet (comment is <!-- Page hiding snippet (recommended) -->).


These are not CSS comments and are causing a problem.


To confirm:

- open your page and using chrome dev tools add the async-hide class on the <html> element.

- you will see that nothing happens.

- find the <style> element of the page hiding snippet, edit it and remove the comment.

- you will see that the CSS rule is applied and the page becomes hidden.


You can move the comment outside of the <style> element or use /* */ instead.



Page hiding snippet not stopping 'flicker'

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

this did the trick. didn't think of that. thanks a lot for your help @Dimitris D.


Maybe you could display the code snippets in the examples with the according comments so people who just copy and paste it wouldn't have problems with it. i guess this would safe a lot of troubles to many people.