Hello everyone, welcome to another tutorial of xandertblog.com to you are going to learn how to add a lazyload google analytics on Blogger and how to speed up your blog loading by installing LazyLoad Google Analytics on the blogger website.
Google Analytics is the most widely used tool by bloggers to analyze or see the static of their blog visitors accurately. By using Google Analytics on a blog, we can find out the number of blog visitors, the area of origin, and even see the static behavior of visitors to the blog. Google Analytics is indeed believed to be the most accurate traffic tracking tool for now.
But it is not uncommon for bloggers who complain about problems that are considered big by some of them, namely that the tracking code provided by Google Analytics is very influential on loading their blog and finally the blog becomes slow.
Yes, indeed this Google Analytics script can weigh on our blog loading. Just like the Meta tracking tag provided by Google Analytics. But don’t worry, there is still a solution to this kind of problem. The first way is to relieve the Google Analytics script and the second is installing the Lazy Load Google Analytics Script on the blogger website.
Before the lazy load is installed, the score only gets 85 – 89. And after installing Lazy Load, the score rises dramatically. Do you also want to install this Google Analytics Lazy Load on your blog so that the blog loads quickly? Look at the complete tutorial on how to install the Google Analytics Lazy Load on the blog below.
How To Install Lazy Load Google Analytics in Blogger
<script type='text/javascript'>
//<![CDATA[
var lazyanalisis=!1;window.addEventListener("scroll",function(){(0!=document.documentElement.scrollTop&&!1===lazyanalisis||0!=document.body.scrollTop&&!1===lazyanalisis)&&(!function(){var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="//www.googletagmanager.com/gtag/js?id=UA-XXXXXXXXX-X";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}(),lazyanalisis=!0)},!0);
//]]>
</script>
Step 6:-Then put the script below before the closing tag </body>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXXXX-X');
</script>
Leave a Comment