GET https://www.google-analytics.com/analytics.js net :: ERR_CONNECTION_REFUSED [英] GET https://www.google-analytics.com/analytics.js net::ERR_CONNECTION_REFUSED

查看:858
本文介绍了GET https://www.google-analytics.com/analytics.js net :: ERR_CONNECTION_REFUSED的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站上遇到了一个大问题。



<问题是,由于某种原因,我的分析代码链接拒绝与以下链接进行交流:

  https:// www.google-analytics.com/analytics.js 

并在控制台中给出此错误:

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

我已联络Google Analytics(分析)支援,但没用。他们告诉我完全按照显示的内容复制分析代码。

< pre class =snippet-code-js lang-js prettyprint-override脚本> (函数(i,s,o,g,r,a,m){i ['GoogleAnalyticsObject'] = r; i [r] = i [r] || function(){(i [r] .q =新的Date(); a = s.createElement(o),m = s.getElementsByTagName(o)[i] [r] .q || [])。push(arguments)},i [r] .l = 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-xxxxxxx-x','auto'); ga('send','pageview');< / script>

b
$ b

我使用GoDaddy的Managed Wordpress Hosting。有没有人遇到这个问题?



谢谢,
Mitko

解决方案

我刚刚查看了您的源代码,可以看到您没有将Google Analytics(分析)跟踪代码放置在< head> 和<$ c之间$ c>< / head> 标签。尝试在这些标签之间放置代码,并看看你如何继续。让我知道你是否仍然有问题!


I am facing a big issue on my website.

The problem is, because of some reason my analytics code link refuses to talk with the following link:

https://www.google-analytics.com/analytics.js

and gives me this error in the console:

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

I have contacted the Google Analytics Support but useless. They told me to copy the analytics code exactly as it's shown.

<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-xxxxxxx-x', 'auto');
  ga('send', 'pageview');

</script>

I am using Managed Wordpress Hosting from GoDaddy. Is there anyone who faced this problem?

Thank you, Mitko

解决方案

I have just looked at your Source Code and can see that you have not placed your Google Analytics Tracking Code between your <head> and </head> tags. Try placing the code between these tags and see how you get on. Let me know if you are still having a problem!

这篇关于GET https://www.google-analytics.com/analytics.js net :: ERR_CONNECTION_REFUSED的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆