admin管理员组

文章数量:1316974

Could anyone help me understand why this happens with google analytics code?

This is the error which then gives me to load the tracking code:

.js Failed to load resource: net::ERR_CONNECTION_REFUSED

Is there any solution to this? I was trying to fix it all morning.

My situation:

If this error occurs, the tracking code does not work. So if events are monitored and callback functions specified in hitCallback property are never executed. When the causes a deficiency in the functionality of the website and also in tracking statistics.

Types of events that have failed me: behavioral events, events advanced electronic merce (step forward cart).

My attempts:

I have disabled antivirus, antivirus firewall, Windows firewall and defend unsuccessfully thinking that could be. I installed the extention to debug google analytics. Googled for hours. I tried loading the code directly in the browser and on any pc I can get it. I could only get .js making a wget from my server console. It could be a problem with the ISP?

Thank you very much!

Update:

Confirmed is the ISP. Although they have not solved in my case because the technician went on vacation.

If someone would e to have this problem, it occurs to me as a solution, edit the code tracking Analitycs to call a url eg "mydomain/analytics.js" it processor by modrewrite, and direct this request php file to download the actual file Js www.google-analytics/analytics.js and return in the response. As a proxy php. It's just an idea I have not tested. Thank you all, and may close this question if you want.

Could anyone help me understand why this happens with google analytics code?

This is the error which then gives me to load the tracking code:

https://www.google-analytics./analytics.js Failed to load resource: net::ERR_CONNECTION_REFUSED

Is there any solution to this? I was trying to fix it all morning.

My situation:

If this error occurs, the tracking code does not work. So if events are monitored and callback functions specified in hitCallback property are never executed. When the causes a deficiency in the functionality of the website and also in tracking statistics.

Types of events that have failed me: behavioral events, events advanced electronic merce (step forward cart).

My attempts:

I have disabled antivirus, antivirus firewall, Windows firewall and defend unsuccessfully thinking that could be. I installed the extention to debug google analytics. Googled for hours. I tried loading the code directly in the browser and on any pc I can get it. I could only get https://www.google-analytics./analytics.js making a wget from my server console. It could be a problem with the ISP?

Thank you very much!

Update:

Confirmed is the ISP. Although they have not solved in my case because the technician went on vacation.

If someone would e to have this problem, it occurs to me as a solution, edit the code tracking Analitycs to call a url eg "mydomain./analytics.js" it processor by modrewrite, and direct this request php file to download the actual file Js www.google-analytics./analytics.js and return in the response. As a proxy php. It's just an idea I have not tested. Thank you all, and may close this question if you want.

Share Improve this question edited Jul 25, 2016 at 13:13 Leonardo Jauregui asked Jul 21, 2016 at 15:32 Leonardo JaureguiLeonardo Jauregui 3163 silver badges6 bronze badges 5
  • Is there an example page that this happens on? Can you also provide info on which browser, OS you are using? – Avi Commented Jul 21, 2016 at 21:13
  • hello, it happens in www.donagro..ar and www.martinmorris..ar. It happens in both chrome and firefox and ie, use microsoft windows. I attached a picture. image with error – Leonardo Jauregui Commented Jul 22, 2016 at 11:37
  • sorry @Avi, SO: win 7 ultimate x64 SP1 – Leonardo Jauregui Commented Jul 22, 2016 at 15:06
  • 1 this is very weird. I tried to go to those same pages but did not see the errors. Could one of the following be an issue: 1) some kind of Ad block? 2) some kind of proxy that is blocking analytics or 3) some kind of proxy that is trying to MITM? (edit: you already mentioned that it is not firewall) – Avi Commented Jul 22, 2016 at 19:09
  • We are still investigating, and apparently the ISP is blocking the file ... we tested just now by other ISPs and had no problems. I'll make the claim. It is rare that only that javascript is locked. It has not happened to me with any other file so far. Maybe this javascript have some particularity as an obfuscation that is detected by some XSS filter? ... Who knows ... I thank you for your help! I hope you have a good day! – Leonardo Jauregui Commented Jul 22, 2016 at 19:39
Add a ment  | 

2 Answers 2

Reset to default 4

It can be that you are using a VPN(Virtual private network) which analytics blocks. Try loading https://www.google-analytics./analytics.js If it does not work, try disabling the VPN and try again

Check your hosts file (on mac go finder > go > go to folder and paste there /etc/hosts | on windows search), in my case www.google-analytics. was blocked in hosts file.

本文标签: javascriptanalyticsjs netERRCONNECTIONREFUSEDStack Overflow