gpt4 book ai didi

javascript - 谷歌分析 : No HTTP Response Detected

转载 作者:行者123 更新时间:2023-11-30 11:58:06 25 4
gpt4 key购买 nike

我正在尝试使用 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

这个 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>

最佳答案

尝试使用分析的调试版本。将分析 URL 更改为 https://www.google-analytics.com/analytics_debug.js (根据建议 from Google )。它将在控制台中显示信息和警告。在我的例子中,它给了我一个警告,提示“ga”已经被定义(我包含的另一个脚本污染了全局 namespace )。

关于javascript - 谷歌分析 : No HTTP Response Detected,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37365579/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com