1

Using Optimizely I can create one or more experiments in a same project, but there is no guarantees that they will not executed simultaneously. For instance, if i'll create 2 experiments for a particular URL with Traffic Allocation for 100% visitors - all of them will receive both experiments. This isn't good, as experience given by first experiment will be combined with second one; they may conflict and potentially affect final numbers.

Official documentation tells that you can use custom JavaScript to setup experiments in the way that only one of them in a group will be activated for a visitor:

https://help.optimizely.com/hc/en-us/articles/200040205-Mutually-exclusive-experiments

I'm ok with JavaScript, but unfortunately, it requires to have predefined list of exclusive experiments in code and copy-paste that script into each of experiments. Also, that technique doesn't takes into account Targeting rules, as having all those experiments in a list doesn't guarantees that all of them will be activated.

I'm looking for JavaScript, which can be placed above/below Optimizely snippet. That code should know which of experiments are matching for current page view and activate only one of those experiments.

Update: 12 July 2014 Optimizely updated their code, so it seems like now everything becomes even more complicated. Anyway after long reverse-engineering and debugging session, it looks like problem might be solved in case if we can randomize order of existing experiments before testing them for traffic allocation rules (after today's changes - unsegmented audience).

4

2 回答 2

2

第 1 步:将两个实验的激活模式更改为“手动激活”。

第 2 步:创建具有一个变体的第三个实验(代理)。因此,您将拥有控制权和变化 1。

第 3 步:在控制手册上激活实验 1,在变体 1 上手动激活实验 2

结论:代理将在两个实验之间分配流量(50/50),并保证实验永远不会同时运行。

于 2015-05-15T15:02:10.713 回答
0

Optimizely 不能保证每个给定页面只会激活一个实验。此外,他们提出的方法不能保证这些实验将获得 50%/50% 的流量。

如果您知道在一个页面上有 2-4 个并发实验并且您希望以特定比例分配流量,您必须将随机化代码添加到:

  1. 页面上 Optimizely 代码段上方的脚本。
  2. 项目 JavaScript
  3. 每个并发实验的全局 JavaScript
    if(!window.trafficSegment) {
      window.trafficSegment = Math.floor(Math.random()*4+1);
    }

此代码以相同的概率 - 25% 生成从 1 到 4 的随机数。现在您可以在您的受众定位条件中使用此变量。

在此处输入图像描述

另一个实验可以让受众定位到流量的后半部分:

var ts = window.trafficSegment;
return ts >=3 && ts <=4;

这不是一个完美的解决方案,但这是无需修补Optimizely 代码的最简单方法。

于 2015-05-14T21:48:58.650 回答