所以我运行 HotelsFirst.com最近看到了一堆谷歌图片搜索流量 http://screensnapr.com/v/Rm1KdJ.png -- 问题是我无法找到人们为了访问我的网站所做的搜索。有很多不同的着陆页,所以一定有很多东西。我在 http://www.google.com/support/forum/p/Google+Analytics/thread?tid=4f166221a4857871&hl=en 找到了一些似乎有用的东西但是我使用的是不同版本的 Google Analytics,所以它对我不起作用。我的 javascript 代码是:
<script type="text/javascript">
/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19201482-3']);
_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 图片中的页面),但这就是您链接到的脚本将如何适应您的代码段。
<script type="text/javascript">
/* <![CDATA[ */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-19201482-3']);
var ref = document.referrer;
if (ref.search(/images.google/) != -1 && ref.search(/prev/) != -1) {
var regex = new RegExp("images.google.([^\/]+).*&prev=([^&]+)");
var match = regex.exec(ref);
_gaq.push(['_clearOrganic']);
_gaq.push(['_addOrganic',"images.google."+ match[1],"q"]);
_gaq.push(['_setReferrerOverride', "http://images.google." + match[1] + unescape(match[2]) ]);
}
_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>
关于javascript - 如何更好地跟踪 Google Analytics 中的 Google 图片搜索流量? [具体关键词],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4606739/