|
|
@@ -43,14 +43,16 @@ html(
|
|
|
script(type='text/javascript').
|
|
|
ga('require', '#{gaOptimizeId}')
|
|
|
ga('send', 'event', 'pageview', document.title.substring(0, 499), window.location.href.substring(0, 499))
|
|
|
- //- Anti-flicker snippet
|
|
|
- style(type='text/css') .async-hide { opacity: 0 !important}
|
|
|
- script(type='text/javascript').
|
|
|
- (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,
|
|
|
- {'#{gaOptimizeId}':true});
|
|
|
+ if !experimentId
|
|
|
+ //- Anti-flicker snippet
|
|
|
+ //- Only run for tests controlled by Optimize editor
|
|
|
+ style(type='text/css') .async-hide { opacity: 0 !important}
|
|
|
+ script(type='text/javascript').
|
|
|
+ (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,
|
|
|
+ {'#{gaOptimizeId}':true});
|
|
|
|
|
|
- else
|
|
|
script(type='text/javascript').
|