【问题标题】:Is ASP.NET (webforms) Incompatible with Google Website Optimizer Multivariate Testing?ASP.NET (webforms) 是否与 Google 网站优化器多变量测试不兼容?
【发布时间】:2010-10-16 04:40:05
【问题描述】:

我整个上午都在苦苦挣扎,试图在谷歌网站优化器中进行多变量测试。

我已将页眉/页脚代码复制并粘贴到页面中,并设置了一个基本页面部分以查看一切正常。

当我尝试验证代码失败时说

"No sections detected on test page
TestSectionName - Unexpected or missing characters - Line: 422 Expected: </noscript>"

愚蠢的是输出明显在那里(我使用了一个asp文字来绕过不对称的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>

在这一切之后,我想知道是否有
a) 任何使用 asp.net 并成功进行多变量测试的人
b) 已知与 asp.net 中的某些内容不兼容
c) 在使用 WSO 多变量测试进行编码时,已知的“禁忌”
d)我错过了一些非常明显的东西?

【问题讨论】:

  • 对不起 - 我的错误,我没有看到那是 noscript。

标签: asp.net web optimization multivariate-testing


【解决方案1】:

我在 ASP.NET 网站上使用 Google 网站优化器多变量测试没有任何问题。

您是否尝试过将&lt;/noscript&gt; 单独放在一行?我想我总是把它放在默认部分之后的空白行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-02-20
    • 2012-02-10
    • 2011-03-15
    • 2010-10-21
    • 2015-05-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多