您如何为多个内容实验选择变体? [英] How can you choose variations for several content experiments?

查看:15
本文介绍了您如何为多个内容实验选择变体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将 Javascript API 用于 Google Analytics Content Experiments,您似乎有两个选择:

I'm using the Javascript API for Google Analytics Content Experiments and it seems like you have two choices:

  1. 一次运行一个实验并让 Google 分配变体,您可以使用 chooseVariation()
  2. 一次运行多个实验并使用 setChosenVariation()
  3. 自己分配变体
  1. Run one experiment at a time and have Google assign the variation, which you can get using chooseVariation(), or
  2. Run several experiments at a time and assign the variation yourself using setChosenVariation()

(1) 让 Google 控制分配给每个变体的用户数量,这是我需要的,但我有几个实验.这看起来很基本.我错过了什么?

(1) lets Google control the number of users assigned to each variation, which I need, but I have several experiments. This seems pretty basic. What am I missing?

推荐答案

我认为您没有遗漏任何东西.我的理解是,GA Experiments API 允许您使用 选择变化命令 :

I don't think you're missing anything. My understanding is that the GA Experiments API allows you to allocate a visitor to any version of a single A/B/N test with the Choose Variation command :

cxApi.chooseVariation();

但是,只有在页面加载api.js时指定了实验ID才可以使用此功能.

However, this function is only available if you specify the experiment ID when loading the api.js on the page.

如果您想做的是同时在一个页面上运行多个 A/B 测试,这确实是多变量测试,不幸的是,这不是out-of-"可用的GA 内容实验中的 the-box'(它曾经可用于 Google 网站优化工具).您仍然可以使用自己的分桶来伪造"它,代码如下:

If what you want to do is to run several A/B tests on one page at the same time, this is really multi-variate testing and unfortunately this is not available 'out-of-the-box' in GA Content Experiments (it used to be available with Google Website Optimizer). You can still 'fake' it using your own bucketing, with code like :

<!-- 1. Load the Content Experiments JavaScript Client -->
<script src="//www.google-analytics.com/cx/api.js"></script>

<!-- 2. See if the visitor has seen an experiment already -->
<script>
// loop through all active experiments server-side. 
cxApi.getChosenVariation(
 $experimentId
 );

<!-- 3. Bucket the visitor if he isn't bucketed already -->
// loop through your live experiments 
  cxApi.setChosenVariation(
    $chosenVariation,             // The index of the variation shown to the visitor
    $experimentId                 // The id of the experiment the user has been exposed to
  );
</script>

您需要决定是希望访问者一次只查看一个实验还是同时输入多个实验.

You will need to decide whether you want a visitor to only view one experiment at a time or enter multiple experiments concurrently.

第一个选项可能更可靠,但意味着您必须将访问者分成相当多的存储桶,这意味着您的测试需要很长时间才能返回结果.

The first option is probably more reliable but means you will have to split your visitor in quite a lot of buckets, meaning your tests will take a long time before returning a result.

如果您使用第二个选项,则需要小心:如果您的实验不是独立的,您将无法信任来自 Google Analytics 的测试结果,因为内容实验中使用的统计测试假设是独立的.即使您的实验是独立的,您也需要在所有变体组合之间平均分配.

If you use the second option, you need to be careful : if your experiments are not independent, you won't be able to trust the test results from Google Analytics, as the statistical tests used in the Content Experiments assume independence. Even if your experiments are independent, you'll need to have an equal split among all variation combinations.

希望有帮助!

这篇关于您如何为多个内容实验选择变体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆