Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(8)
这是这样的: http://ejohn.org/blog/genic-ab- testing-with-javascript/
您是否想测试网站的适销性或代码的性能或什么?
假设有销路,您可以简单地使用一些 JS,根据随机数将类名附加到您的 body 标记(+其他任何内容)。 然后通过您使用的任何分析引擎记录随机选择和结果(当访问者单击某些内容时,还记录他们看到的随机布局)。 您还可以考虑使用 cookie 来确保回访者获得相同的待遇。
我不知道 JS 的代码质量 a/b 框架,但想法是相似的。 定义什么构成更高的质量(执行时间更短?),运行代码的变体,看看哪个会领先。 JMeter 和 JSUnit 等工具可能有助于实现这些目的。
Here's this: http://ejohn.org/blog/genetic-ab-testing-with-javascript/
Are you trying to test the marketability of your site or the performance of your code or what?
Assuming marketability, you could simply have some JS that appends a class name to your body tag (+ whatever else) based on a random number. Then record the random choice and outcome (when the visitor clicks something, also record which random layout they were presented with) via whatever analytics engine you use. You could also consider using cookies to ensure returning visitors get the same treatment.
I don't know of a code quality a/b framework for JS but the idea would be similar. Define what constitutes higher quality (lower milliseconds of execution time?), run the variations of the code and see which comes out ahead. Tools like JMeter and JSUnit might be helpful for these purposes.
我发现这个简单的开源 JS 工具非常有用: https://github.com/jamesyu/cohorts
它没有您可能想要的所有功能,但它是免费的、灵活的、编写得非常好且整洁,并且您可以随时对其进行修改以支持其他要求。
支持 Google Analytics(通过事件跟踪)和其他后端。
I have found this simple, open-source JS tool quite useful: https://github.com/jamesyu/cohorts
It doesn't have all the features you might want, but it's free, flexible, pretty well and tidily written, and you can always hack on it to support additional requirements.
Supports Google Analytics (via event tracking) and other back-ends.
Maxymiser 非常灵活,几乎完全在 JavaScript 中运行(从程序员的角度来看)。 虽然它很贵。 这就是我们最终选择的。
Maxymiser is really slick and functions almost entirely in JavaScript (from the programmer's perspective). It is expensive though. This is the one we ended up going with.
你可以试试这个: ABalytics.js - A JavaScript Library For Client-使用 Google Analytics 进行侧面 A/B 测试
这是一个简洁的小软件包,允许您使用 JavaScript 纯粹在客户端执行 A/B 测试,同时将结果存储在 Google Analytics 中。
You can try this: ABalytics.js - A JavaScript Library For Client-Side A/B Testing With Google Analytics
It's a neat little package, which allows you to perform A/B Testing purely on the client-side using JavaScript, while storing results in Google Analytics.
还有Google 网站优化工具。
There's also Google Site Optimizer.
这个问题已经有四年了,而且仍然在搜索中出现,所以这里有一个新的(2013 年 5 月)Javascript A/B 测试库:
https://github.com/maccman/abba
附带一个小型 Sinatra 服务器应用程序来收集数据并显示结果。
This question is four years old and still coming in searches, so here's a new (May 2013) Javascript A/B testing library:
https://github.com/maccman/abba
Comes with a little Sinatra server app to collect the data and show results.
通过几行 JS,您还可以实现 A/B 测试。 您只需将组成员身份存储在持久 cookie 中,并据此做出决策。 对于 A/B 测试,测量是最重要的部分。 这可以通过 Google Analytics 轻松完成,如以下博客所示:Google Analytics 中的简单 ab 测试
With a couple of line of JS you can also implement an A/B test. You only have to store the group membership in a persistent cookie and do the decisions based on that. For A/B testing the measurement is the most important part. This can be done very easily with Google Analytics like on the following blog: simple ab test in Google Analytics
如果您使用服务器端语言,我建议您在服务器上进行拆分测试,因为这将允许您保存结果。 在 javascript 中,你将不得不使用 jsonp 或其他难看的难闻的东西来保存分割测试的结果。
我写了一个小 有关 ASP.NET MVC 的文章。 它可能会激励您用您使用的任何后端语言来实现类似的东西。
If you are using a server side language I recommend doing the split testing on the server as this will allow you to save the results. in javascript you will have to use jsonp or other ugly smelly things to save the results of your split tests.
I wrote a small article on this for asp.net mvc. It may inspire you to implement something similar in whatever backend language u use.