Reputation: 2650
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.
Upvotes: 3
Views: 1943
Reputation: 4589
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
Upvotes: 1