我有一个由Weebly.com托管的网站,无法将其设置为使用Google Analytics(分析)进行拆分测试。有3个附件:
Shown in the attachment is my error notice.
The second email shows how I input HTML into Weebly.
The 3rd image is an email from Weebly telling me that this can be done but it is challenging.
4th image is the Weebly editor where I can make html changes
如果有人能指导我如何进行这项工作,我将不胜感激!
最佳答案
我强烈建议您在GA代码上切换为使用prefix。理想情况下,Weebly应该使用此前缀,因为它们是供应商,但在这种情况下则不是。
就目前而言,您将发生以下情况:
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28626443-1']);
_gaq.push(['_trackPageview']);
然后在页面的后面,将Weebly的GA代码插入页面。
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7870337-1']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
您会看到这将覆盖您的跟踪器并更改域名(从自动更改为无)。我建议用如下代码替换您的代码:
var _gaq = _gaq || [];
_gaq.push(['my._setAccount', 'UA-28626443-1']);
_gaq.push(['my._trackPageview']);