我整个上午都在苦苦挣扎,试图在谷歌网站优化器中进行多元测试。
我已经将页眉/页脚代码复制并粘贴到页面中,并设置了一个基本的页面部分,以确保一切正常。
当我试图验证代码时,它的失败说明
"No sections detected on test page
TestSectionName - Unexpected or missing characters - Line: 422 Expected: </noscript>"
愚蠢的是,输出很清楚(我使用了一个asp文本来绕过asymmetric noscript标记),并且可以在源代码中清楚地看到它,如下所示:
<script>utmx_section("TestSectionName")</script><h1>Buy This Product!</h1></noscript>
我已经尝试过禁用/删除网站中现有的谷歌分析代码,因为这与它有冲突,但运气不佳。
我认为asp.net框架和这个WSO框架可能有些不兼容。我能够使用保存到一个没有asp.net/page内容的原始html文件中的完全相同的代码,并对其进行验证。
例如。
<html><head></head><body>
<!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
(function(){var k= xxxxx ,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 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 -->
<script>utmx_section("TestSectionName")</script><h1>Buy This Product!</h1></noscript>
<!-- Google Website Optimizer Tracking Script -->
<script type="text/javascript">
if(typeof(_gat)!= object )document.write( <sc + ript src="http +
(document.location.protocol== https: ? s://ssl : ://www )+
.google-analytics.com/ga.js"></sc + ript> )</script>
<script type="text/javascript">
try {
var gwoTracker=_gat._getTracker("UA-xxxxx-1");
gwoTracker._trackPageview("/xxxxx/test");
}catch(err){}</script>
<!-- End of Google Website Optimizer Tracking Script -->
</body>
</html>
After all of this I am wondering if there is
a) anyone out there using asp.net with multivariate testing successfully
b) a known incompatibility with something in asp.net
c) known "donts" when it comes to coding with WSO multivariate testing
d) something really obvious I am missing?