我一直在使用 Urchin 6,但也刚刚开始使用 Google Analytics。我也在使用 Google Search Appliance 进行网站搜索。
搜索位于子域上,即 www.search.mysite.com
问题是谷歌分析正在跟踪网站搜索作为自我推荐。经过大量的在线阅读后,我最终得到了下面的 GA 代码配置,它应该可以获取搜索子域,但事实并非如此。任何人都可以看到我的配置有什么不正确的地方吗?- 例如,GATC 请求处理顺序是否正确
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxx-1']);
_gaq.push(['_setLocalRemoteServerMode']);
_gaq.push(['_setLocalGifPath', '/__utm.gif']);
_gaq.push(['_setDomainName', 'mysite.com]);
_gaq.push(['_addIgnoredRef', 'mysite.com']);
_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>
我怀疑问题可能出在 Google Search Appliance 上的 GA 配置上。当您添加 GA 时,它只要求 XSLT 上的 UA 代码,然后您在每个搜索页面上发送以下脚本:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">
<!--
_uacct = "UA-xxxxxxx-1";
urchinTracker();
//--></script>
这可能是问题所在,还是此代码需要在 XSLT 中更改,或者可能不需要?
任何帮助,将不胜感激。谢谢