Commits

Anonymous committed 162dd10

Comments (0)

Files changed (1)

 == Welcome ==
 
-{{{django-lean}}} aims to be a collection of tools for [[http://www.startuplessonslearned.com/search/label/lean%20startup|Lean Startups]] using the Django platform. Currently it provides a framework for implementing [[http://www.startuplessonslearned.com/search/label/split-test|split-test experiments]] in Javascript, template, or Python code along with administrative views for analyzing the results of those experiments.
+{{{django-lean}}} aims to be a collection of tools for [[http://www.startuplessonslearned.com/search/label/lean%20startup|Lean Startups]] using the Django platform. Currently it provides a framework for implementing [[http://www.startuplessonslearned.com/search/label/split-test|split-test experiments]] in JavaScript, Python, or Django template code along with administrative views for analyzing the results of those experiments.
 
 In the spirit of lean, we have open-sourced this library as quickly as possible, meaning that it might not have all the bells and whistles one might hope for, in particular with regards to setup. Any competent Django/Python developers should have little trouble integrating {{{django-lean}}} with their own projects, but if you would like to see support for your favorite installation mechanism, consider contributing a patch.
 
 
 {{{django-lean}}} allows you to perform split-test experiments on your users. In brief, this involves exposing 50% of your users to one implementation and 50% to another, then comparing the performance of these two groups with regards to certain metrics.
 
+=== Experiments Types ===
+
 {{{django-lean}}} supports two kinds of experiments currently:
 
 * Anonymous Conversion experiments compare the achievement of goals you define (i.e. "register" or "add to cart") amongst two groups of anonymous users.
 * Registered Engagement experiments compare a quantitative measure of engagement that you define (i.e., activity, revenue, time on site, ...) amongst two groups of registered users.
 
-There's no real reason why one couldn't measure engagement of anonymous users or conversions of registered users (i.e. "basic to pro") but we didn't need this, so they're not implemented (again, patches welcome!).
+There's no real reason why one couldn't measure engagement of anonymous users or conversions of registered users (i.e. "basic to pro") but we didn't need this, so they're not implemented (again, patches welcome!).
+
+=== Experiment Reports ===
+
+{{{django-lean}}} provides daily reports of experiment results, including confidence levels.
+
+* For conversion experiments, results and confidence are displayed per conversion goal type (and for 'any' goal). Confidence is calculated using the chi-square method.
+* For engagement experiments, confidence is calculated using the chi-square method.
+
+=== Bot Exclusion ===
+
+{{{django-lean}}} attempts to exclude non-human visitors from experiment reports by only recording data for visitors who have JavaScript enabled.
+
+=== Experiment Management ===
+
+Experiments may be defined, enabled, disabled, or promoted via the {{{django-admin}}} interface. You may also define experiments in your source tree and have them automatically loaded into the database (see {{{experiments.loader.ExperimentLoader}}}).
+
+=== Experiment Implementation ===
+
+{{{django-lean}}} makes it easy to implement experiments in Python, JavaScript, or Django templates. Here are some examples:
+
+==== Python ====
+
+{{{
+#!python
+from experiments.models import Experiment
+from experiments.util import WebUser
+
+...
+
+def my_view_func(request, *args, **kwargs):
+    if Experiment.test("my_experiment_name", WebUser(request)):
+        view = edit_profile_test
+    else:
+        view = edit_profile_control
+    return view(request, *args, **kwargs)
+}}}
+
+==== Django Templates ====
+
+{{{
+#!html+django
+
+{% load experiments %}
+
+...
+
+<p>If you like what you see,
+
+{% experiment change_buy_to_italics control  %}
+<b>buy now!</b>
+{% endexperiment %}
+
+{% experiment change_buy_to_italics test  %}
+<i>buy now!</i>
+{% endexperiment %}
+
+</p>
+}}}
+
+==== JavaScript ====
+
+//(In your HTML template:)//
+{{{
+#!html+django
+
+{% load experiments %}
+<script>
+<![CDATA[
+{% include "experiments/include/experiments.js" %}
+]]>
+</script>
+...
+
+{% clientsideexperiment <experiment_name> %}
+}}}
+
+//(In your JavaScript:)//
+{{{
+#!javascript
+if (experiment.test("<experiment_name>")) {
+  // test case
+} else {
+  // control case
+}
+}}}