analytics.js net::ERR_CONNECTION_REFUSED
<p>Could anyone help me understand why this happens with google analytics code?</p>

<p>This is the error which then gives me to load the tracking code:</p>

<blockquote>
  <p><a href="https://www.google-analytics.com/analytics.js" rel="noreferrer">https://www.google-analytics.com/analytics.js</a> Failed to load resource: net::ERR_CONNECTION_REFUSED</p>
</blockquote>

<p>Is there any solution to this? I was trying to fix it all morning.</p>

<p><strong>My situation:</strong></p>

<p>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.</p>

<p>Types of events that have failed me: behavioral events, events advanced electronic commerce (step forward cart).</p>

<p><strong>My attempts:</strong></p>

<p>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 <a href="https://www.google-analytics.com/analytics.js" rel="noreferrer">https://www.google-analytics.com/analytics.js</a> making a wget from my server console.
It could be a problem with the ISP?</p>

<p>Thank you very much!</p>

<p><strong>Update:</strong></p>

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

<p>If someone would come to have this problem, it occurs to me as a solution, edit the code tracking Analitycs to call a url eg "mydomain.com/analytics.js" it processor by modrewrite, and direct this request php file to download the actual file Js www.google-analytics.com/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.</p>