简体   繁体   中英

Failed to load resource: net::ERR_CONNECTION_RESET in https://www.google-analytics.com/ga.js

This happens to be a new error to me where when i debugged my Code, It shows this kind of error in google-analytics

Failed to load resource: net::ERR_CONNECTION_RESET https://www.google-analytics.com/ga.js

Then after i refresh the browser it now shows

GET https://www.google-analytics.com/ga.js net::ERR_TIMED_OUT

that could be the source why the page loads so slow

Also when accessing this https://www.google-analytics.com/ga.js i cant even see the javascript but when i tried accessing it in Firefox, it works and show the javascript file of google analytics

Tried in IE 11 and Firefox 28.0 and its working,also done Deleting Cache and finding Adblock extension in Google chrome that doesnt exist. Still didnt work out well

Can someone help me with this , and how to solve this issue

BTW: This is the Code which produces the error:

var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
    (function (d, t) {
        var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
        g.src = '@@|//www.google-analytics.com/ga.js';
        s.parentNode.insertBefore(g, s)
    } (document, 'script'));

That doesn't look like the standard tracking code for classic Google Analtyics. Have you tried getting the standard code from your Admin section?

Admin -> property -> tracking info -> Tracking code

Or you can get the code from Tracking Basics

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM