Optimize
2.6K members online now
2.6K 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
star_border
Reply

Landing Page

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Since I've added the Analytics code and the Optimization Code to two of my pages, they've been loading up slow. How can I fix this?

Landing Page

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

I guess you can just combine both into one without adding Optimize Code separately. 

 

Refer this help center article for more information on deploying the code.

Re: Landing Page

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Here is how I have the code set:

 

<style>.async-hide { opacity: 0 !important} </style>
<script>(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-WRRBHMM':true});</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-97816917-1', 'auto');
ga('require', 'GTM-WRRBHMM');
ga('send', 'pageview');
</script>

 

Landing Page

Follower ✭ ✭ ✭
# 4
Follower ✭ ✭ ✭

It'd be great to hear what Google would recommend in this situation. You can combine them, but otherwise, it seems odd that a slight amount of time added for loading would have a significant impact on visitor behavior.