【问题标题】:Google Analytics on intranet not trackingIntranet 上的 Google Analytics(分析)未跟踪
【发布时间】:2014-01-12 20:06:36
【问题描述】:

我有一个本地用户可以访问的内部网

http://intranet 

和全国各地的用户在

http://intranet.ourdomain.com

从外部 URL 查看内网的用户

http://intranet.ourdomain.com 

跟踪他们的活动,但那些试图通过

访问 Intranet 的人
http://intranet 

不要

我用内网电脑测试过,机器可以访问:

http://www.google-analytics.com/ga.js

http://www.google-analytics.com/__utm.gif

https://ssl.google-analytics.com/ga.js

https://ssl.google-analytics.com/__utm.gif

没有问题,而且如果机器导航到http://intranet.ourdomain.com,那么该活动就会被跟踪。

任何人都知道为什么它不跟踪

http://intranet 

连接。

注意:跟踪信息设置为:

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
  _gaq.push(['_setDomainName', 'ourdomain.com']);
  _gaq.push(['_setAllowLinker', true]);
  _gaq.push(['_trackPageview']);

  (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);
  })();

</script>

真的可以追踪吗

http://intranet ???

【问题讨论】:

  • 尝试删除_setDomainName 行。如果这不起作用,请尝试'_setDomainName', 'none'
  • 至少按照this article的说法,是无法追踪内网的。
  • 哎哟!我无法编辑我的评论,但有文章提到了 _setDomainName hack。希望它有效。

标签: google-analytics intranet


【解决方案1】:

为了解决这个问题,我按照@nwellnhof 的建议进行了设置

  '_setDomainName', 'none'

我还添加了一个过滤器来显示完整的 URI,以便区分不同的环境。我从这里得到了过滤器信息http://www.annielytics.com/how-to-add-a-hostname-filter-in-ga/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-01-08
    • 2019-07-10
    • 1970-01-01
    • 1970-01-01
    • 2014-01-05
    • 2018-06-17
    • 2013-12-06
    相关资源
    最近更新 更多