Google Analytics(分析)代码始终将页面名称报告为“$A”
我有一些代码(如下),用于跟踪 Google Analytics 上的综合浏览量。在 Google Analytics 中,所有页面最终都具有名称“$A”。
我似乎找不到任何遇到同样问题的人,我也看不出我做错了什么:
<script type="text/javascript">
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_gaq.push(['_trackPageview']);
</script>
<script src="/__utm.js" type="text/javascript"></script>
I have some code (below) that I'm using to track pageviews on Google Analytics. In Google Analytics, all pages end up having the name "$A".
I can't seem to find anyone who has had the same issue and I can't see what I'm doing wrong:
<script type="text/javascript">
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_gaq.push(['_trackPageview']);
</script>
<script src="/__utm.js" type="text/javascript"></script>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来,问题实际上不是跟踪代码有问题,而是为您的帐户配置的过滤器。
具体来说, $A 听起来像是您有一个配置不正确的基于 Reyes 的过滤器,它不是输出正则表达式匹配,而是输出字符串“$A”,除非您正确使用正则表达式,否则这是没有意义的。
您可以发布有关个人资料的详细信息吗?无论如何,您都不应该在主配置文件上进行过滤,因为过滤器无法撤消,因此主配置文件上的任何配置错误都将导致数据永久丢失。
我的建议是完全删除现场的过滤器,复制配置文件并针对重复应用您所需的过滤器,以减轻此类潜在的数据丢失问题。
It sounds like, rather than there being a problem with the tracking code, that the problem is actually with a filter configured for your account.
Specifically, $A makes it sound like you have an improperly configured Reyes based filter that, rather than outputting the regex match, is instead outputting the string "$A", which is meaningless unless you're properly using RegEx.
Can you post detailed information about the profile? In any case, you shouldn.t be filtering on a main profile, since filters cannot be undone, so any configuration errors on your main profile will result in permanently lost data.
My recommendation is to totally remove the filters in pladce, duplicate the profile and apply your desired filters against the duplicate, to mitigate potential data loss problems like this.