Dear All, I would say a better still way is to include the whole modified GA snippet in Tealium sync tag (accessible via 'Manage Templates'). This way it loads quicker, which is so important to speed up loading of variations and reduce flickering. Still, the primary issue is the hiding snippet. I have added the following to the utag.sync template: //create data layer
var dataLayer = dataLayer || [];
//create style for hiding element
var css = '.async-hide { opacity: 0 !important} ',
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet){
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
};
//hiding snippet
(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;
})(window,document.documentElement,'async-hide','dataLayer',4000, {'GTM-MF5BFM5':true});
head.appendChild(style); It seems to work, but if anyone has a better suggestion or can improve the hiding snippet, please let me know. Thanks, Florian
... View more