Analytics
6K members online now
6K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Google Analytics code is slowing down our website

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

We have experienced slow loading time with Google Analytics code on our website. We ran the Gtmetrix test to see the requests waterfall, and it turns out that files in requests for page rendering are waiting for Google Analytics.js for 14 seconds. This is the analytics.js from - https://www.google-analytics.com/analytics.js Anyone else experienced this problem? I have never had a website loading such a long time before. Maybe someone has a solution? We use Google TAG manager for the analytics code.

 

Regards

 

Here is a screenshot with the waterfall:

Google Analytics code is slowing down our website

Follower ✭ ✭ ✭
# 2
Follower ✭ ✭ ✭

@Linards L

 

pls provide a link to the website?

Google Analytics code is slowing down our website

Participant ✭ ✭ ✭
# 3
Participant ✭ ✭ ✭

Google Analytics tracking code is asynchronous (a.async = 1), meaning that the browser doesn't need to wait for the code to finish loading to continue rendering elements that come after it on the page. The gtm.js will delay the window.load event if it fails to load in some browsers but it will not block the DOM-ready event.

To sum up, it's a good idea to get into the habit of placing the GTM container snippet in <head>, because that's where asynchronously loading libraries should be placed. 

 

Recommend reading those articles:

1) http://www.lunametrics.com/blog/2016/09/21/site-speed-google-tag-manager/

2) https://www.simoahava.com/analytics/google-analytics-page-load/

All the best,

Taavi

Google Analytics code is slowing down our website

Follower ✭ ✭ ✭
# 4
Follower ✭ ✭ ✭

I experienced this once before Google 'bettered' Analytics.

 

Since then, no glitch yet.

Google Analytics code is slowing down our website

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

And why is asynchronous, other tools about test speed steel give us problem of load the website?