I actually didn’t even plan for google to fail at anything hahahahaha
But , luckily this method will be unphased by google analytics failing because what it’s doing is checking to see if the ga function is loaded in the first place .
If you look at trackgoogleanalytics() you can see that the first conditional checks if the method is attached to the window object , if not then none of the code runs
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
How does implementing Google Analytics this way impact your application if Google's script fails to load?
Nice observation !
I actually didn’t even plan for google to fail at anything hahahahaha
But , luckily this method will be unphased by google analytics failing because what it’s doing is checking to see if the ga function is loaded in the first place .
If you look at trackgoogleanalytics() you can see that the first conditional checks if the method is attached to the window object , if not then none of the code runs