我正在尝试设置 GA 内容实验,并在 Chrome 控制台中看到一个错误,显示“在将命中发送到 GA 之前应选择变体”。该错误仅在我在设置 cookie 之前第一次加载页面时出现。如果我清除 cookie 并重新加载,它会出现
它似乎没有引起任何问题,但很好奇它的含义。我在 Google 论坛上发帖,但没有人解释。这里有人有什么想法吗?
这是我的代码
<script src="http://www.google-analytics.com/cx/api.js?experiment=lYhtgjICSTGh0PEyfMA30w"></script>
<script>
var chosenVariation = cxApi.chooseVariation();
var pageVariations = [
function() {
$("#pdp_promo2").append($("#tagineBanner"));
$('#tagineBanner').show();
},
function() {
$("#banner").attr('src', '/wcsstore/CVWEB/images/home/bnr_tagineB.jpg')
$("#pdp_promo2").append($("#tagineBanner"));
$('tagineBanner').show();
}
];
$(document).ready(
pageVariations[chosenVariation]
);
</script>