问题描述
我正在尝试在我的网站上设置Google Analytics,但无法检测到它正在被跟踪。
我已经将它们提供的代码放在我的header.php中,正好在建议的< / head>
之前:
< 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-41420598-1','example.com');
ga('send','pageview');
< / script>
不太确定还有什么可以做的。
如果您是Google Analytics品牌的新用户,则默认报告仅包含截至前一天的数据。如果您想在添加跟踪代码的同一天查看活动,则必须调整日期范围以包含当天的活动。
I am trying to setup Google Analytics on my site, however it will not detect that it is being tracked.
I have placed the code they provided in my header.php right before the </head>
as recommended:
<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-41420598-1', 'example.com');
ga('send', 'pageview');
</script>
Not really sure what else to do..
It took a day or two after I put the tracking code on each of my pages for the status on my Google Analytics Tracking Info tab to be updated from "Tracking Not Installed" to "Universal Analytics is enabled for this property". During this time I was seeing regular activity in my tracking reports.
If you're brand new to Google Analytics, the default reports only include data up to the previous day. If you want to check for activity on the same day that you added the tracking code, you have to adjust the date range to include the current day's activity.
这篇关于谷歌分析:跟踪未安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!