I am developping an Angular 6 application, and I want to use Google Analytics on it. The problem is that google chrome does not load the analytics.js script and gives the following error message:
Failed to load resource: net::ERR_TIMED_OUT
I want to note that the script works very well in Opera with VPN activated. Here is the script I added to the index.html file
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXXXXXXXX-ID', 'auto');
</script>
Thank You.
Maybe your chrome is under a proxy, please check.
If it works in other browsers
Check to see if you have any extensions running
There are several blockers that do not allow access to trackers like Google Analytics
I turn all of mine off when I need to test
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With