I am trying to track my webpage using Google Analytics on GoDaddy. I have never run into an issue using it before; however, Google Tag Manager is telling me that there was no HTTP Response Detected from the Google Analytics Tag.
我正在尝试使用GoDaddy上的Google Analytics跟踪我的网页。我之前从未遇到过使用它的问题;但是,Google跟踪代码管理器告诉我,Google Analytics代码中没有检测到HTTP响应。
Missing HTTP Response denotes that, while the Google Analytics code was detected in the page source, the script itself did not execute. Each time the Google Analytics script executes, we expect an HTTP Response carrying the tracking request to Google’s servers. This means that the Google Analytics code is not implemented properly on the page and no data will be collected. https://support.google.com/tagassistant/answer/3059154#http_response
缺少HTTP响应表示,虽然在页面源中检测到Google Analytics代码,但脚本本身并未执行。每次执行Google Analytics脚本时,我们都会希望向Google服务器发送跟踪请求的HTTP响应。这意味着Google Analytics代码未在页面上正确实施,也不会收集任何数据。 https://support.google.com/tagassistant/answer/3059154#http_response
Does anything stick out to anyone in the head of this html:
在这个HTML的头部有什么事情可以解决:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Page Information -->
<meta name="description" content="...">
<meta name="author" content="...">
<title>Happening</title>
<!-- Favicon -->
<link rel="apple-touch-icon" sizes="57x57" href="img/icons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="img/icons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/icons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="img/icons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/icons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="img/icons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="img/icons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="img/icons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="img/icons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="img/icons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="img/icons/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="img/icons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="img/icons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="img/icons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="img/icons/manifest.json">
<link rel="mask-icon" href="img/icons/safari-pinned-tab.svg" color="#571619">
<!-- Shows error when validated, but is legal -->
<link rel="shortcut icon" href="img/icons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Happening">
<meta name="application-name" content="Happening">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="img/icons/mstile-144x144.png">
<meta name="msapplication-config" content="img/icons/browserconfig.xml">
<meta name="theme-color" content="#571619">
<!-- Styles -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/bootstrap-datetimepicker.min.css">
<!-- Fonts -->
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.2/css/font-awesome.min.css">
<!-- JS Libs -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="js/moment-with-locales.min.js"></script>
<script src="js/bootstrap-datetimepicker.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
<!-- Google Analytics -->
<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-77358803-2', 'auto');
ga('send', 'pageview');
</script>
</head>
1 个解决方案
#1
2
Try using the debug version of analytics. Change the analytics URL to https://www.google-analytics.com/analytics_debug.js (per the advice from Google). It will display information and warnings in the console. In my case, it gave me a warning that 'ga' was already defined (another script I was including had polluted the global name space).
尝试使用分析的调试版本。将分析网址更改为https://www.google-analytics.com/analytics_debug.js(根据Google的建议)。它将在控制台中显示信息和警告。在我的情况下,它给了我一个警告,'ga'已经定义了(我所包含的另一个脚本污染了全局名称空间)。
#1
2
Try using the debug version of analytics. Change the analytics URL to https://www.google-analytics.com/analytics_debug.js (per the advice from Google). It will display information and warnings in the console. In my case, it gave me a warning that 'ga' was already defined (another script I was including had polluted the global name space).
尝试使用分析的调试版本。将分析网址更改为https://www.google-analytics.com/analytics_debug.js(根据Google的建议)。它将在控制台中显示信息和警告。在我的情况下,它给了我一个警告,'ga'已经定义了(我所包含的另一个脚本污染了全局名称空间)。