我已经在两个域中设置了三个 GWO 多变量测试。我已经正确设置了着陆页,它正在跟踪所有三个测试的访问者,但没有记录任何一个的转化。我已按照 Google 提供的跨域跟踪说明进行操作,但仍然没有任何问题。
这是着陆页代码段(已删除 ID):
<script>
// Allows for multiple-domain tracking
_udn = "none";
</script>
<!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
(function(){var k='xxxxxxxxxx',d=document,l=d.location,c=d.cookie;function f(n){
if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return escape(c.substring(i+n.
length+1,j<0?c.length:j))}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
d.write('<sc'+'ript src="'+
'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
+'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
'" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
</script>
<!-- End of Google Website Optimizer Control Script -->
<!-- Google Website Optimizer Tracking Script -->
<script>
var _gaq = _gaq || [];
_gaq.push(['gwo._setAccount', 'UA-xxxxxxxx-x']);
_gaq.push(['gwo._setDomainName', 'none']);
_gaq.push(['gwo._setAllowLinker', 'true']);
_gaq.push(['gwo._trackPageview', '/xxxxxxxxxx/test']);
(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>
<!-- End of Google Website Optimizer Tracking Script -->
这是转换页面片段:
<!-- Google Website Optimizer Conversion Script -->
<script>
var _gaq = _gaq || [];
_gaq.push(['gwo._setAccount', 'UA-xxxxxxxx-x']);
_gaq.push(['gwo._setDomainName', 'none']);
_gaq.push(['gwo._setAllowLinker', true]);
_gaq.push(['gwo._trackPageview', '/xxxxxxxxxx/goal']);
(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>
<!-- end of Google Website Optimizer Conversion Script -->
一些陷阱:
- 转换脚本片段位于页脚中,在结束
</body>
标记之前。这是由于网站的构建方式。 - 转化页的 URL 是可变的,具体取决于访问者如何通过其前面的渠道。
- 着陆页和转化页都在 GWO 代码段之后插入了 Google Analytics 代码段(尽管在一种情况下,转换页上没有 Analytics 代码段)。