Analytics.js callback executed before library is loaded
问题 I'm facing a very weird issue with analytics.js. Basically, I have a basic implementation at the top of the page, and inside another JS file that is loaded right after the analytics.js is downloaded and initialized I have a function that validates if ga has been enabled loaded. In that function I get the ga function in a local variable named gaFn , and I use the callback function of the analytics library to make sure the analytics library has been loaded to use the tracker, my problem is that