贝娄是我的代码。我是 GA 的新手,我刚刚创建了一个随机站点,以查看是否可以正确实施(这是一个简单的 Hello World)。从我所有的知识和阅读论坛、书籍和说明的时间来看,这应该有效。但我仍然收到错误消息“未安装跟踪”。但是,我正在从 GA 获取实时数据;所以我知道它正在正确地ping我的网站。另外,有人可以查看我的自定义变量以确保正确实施吗?谢谢
<html>
<head>
<title>Testing Google Analytics Script type B</title>
<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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-15047826-4', 'patientordersets.com');
ga('send', 'pageview');
</script>
</head>
<body>
<h1>Hello world B</h1>
<p id="demo">
<script>
document.getElementById("demo").innerHTML=Date();
</script>
</p>
<script>
var Data1 = 'blah';
var Data2 = 'blach';
var Data3 = 'blanch'
</script>
<script type="text/javascript">
_gaq.push(
['_setAccount', 'UA-15047826-4'],
['_setCustomVar', 1, "Data1", Data1, 2],
['_setCustomVar', 1, "Data2", Data2, 2],
['_setCustomVar', 1, "Data3", Data3, 2],
['_trackPageview'],
);
</script>
</body>