How to Lazy Load Google Analytics Code in Blogger
Hi to all, in this article I am going to tell you all about how to lazy load google analytics code in your blogger website easily in just few minutes wiothout any error or issues.
Basically by adding this lazy load google analytics code in your bogger website will improve, your website loading speed and also you can decrease bounce rate of your webpage.
By adding this lazy load code in your website, you can save up to 3 HTTP request and you can solve render blocking effect while loading the webpage.
Finding Google Analytics tracing Id or code
Follow the below path carefully:
1- Login to Google Analytics account.
2- Click on admin settings.
3- Choose your website property.
4- Click on data streams.
5- Select your website.
6- Here you need to copy measurement Id and paste that in lazy load code.
Read the below provided steps carefully and completely to get clear understanding about lazy loading google analytics code in your blogger website without any error.
Steps to Lazy Load Google Analytics in Blogger
Step-1: First of all you need to login to your blogger website dashboard y using your login credentials.
Step-2: Follow the below path carefully:
Blogger website dashboard -> Click on theme section -> Click on arrow icon -> Click on backup -> Click on download theme.
Step-3: Now again follow the below path:
Blogger website dashboard -> Click on theme section -> Click on arrow icon -> Click on Edit HTML -> Blogger theme editor.
Step-4: Now you need to copy the below script code.
Step-5: Now paste the copied code in any code editor or notepad to edit the script code.
Step-6: Now you need to replace your G-xxxxxxxxxx tracking id with the default id in the lazy load script carefully.
Step-7: After replacing the tracking Id in the code, you need to press CTRL + A to select complete code and then press CTRL + C to copy the complete code.
Step-8: Now you need to paste the modified code just above closing body tag or </body> tag.
Step-9: After adding the code in your blogger theme editor, click on save button.
Step-10: Now you have successfully lazy load google analytics code in your logger website easily in just few minutes.
Note:
If you get any error while saving the code then you need to restore your backup code again nd need to repeat the same process as mentioned in above steps carefully.
Before adding the lazy load analytics code in your theme, replace it with your own google analytics tracking id, if you will not add that tracking id then this code will not work.
To check your website speed and other data, you can visit page speed insights website and enter your website URL and click on analyze, there you can see speed to your website, and after adding this script your webpage speed will definitely increase a lot.
Paste the code in correct place and replace the measurement Id in the code and don't try to edit any script, if you edit or modify then, this may not work properly.
Disadvantages of adding Lazy Load Analytics code
By adding this lazy load analytics code to your blogger theme may impact your analytic data and it will not able to track the views if any users closes the webpage before complete loading of a webpage.
It's fine as it makes no sense to track those users who closes the webpage before the page loads completely.
Conclusion
I hope that you have understood about how to lazy load google analytics code in blogger website easily in just few minutes without any issue or errors.