You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 11, 2023. It is now read-only.
Software addons such as AdBlock Plus, uBlock Origin, Ghostery, Brave browser, and more will all prevent Google Analytics from loading by blocking the web request. Extenuating circumstances such as server issues can also prevent connection to Google Analytics.
In this scenario, there should be a convenient function that reliably determines if the Google Analytics script has loaded and the server is accessible.
Something like the following:
// If not using AdBlocker:
ReactGA.initialize('UA-000000-01');
ReactGA.hasLoaded(); // Returns 'true'
// If using an AdBlocker, or if the Google Analytics server is otherwise unaccessible:
ReactGA.initialize('UA-000000-02');
ReactGA.hasLoaded(); // Returns 'false'
Nikki1993, jaedb, sagararyal, jrd656, EliteMasterEric and 7 more