1. akoha
  2. django-lean
  3. Issues
Issue #4 new

Create "initializeexperiments" tag to simplify setup of template experiments

Erik Wright
created an issue

See <<issue 1>>, from which this is extracted.

//The last one I was thinking of is even more minor but what about wrapping the <script>{% include "...experiment.js" }</script> in a template tag and combining it with the clientsideexperiment tag? i.e. {% experiment_js_header exp_name1 exp_name 2 ... %} A document onLoad handler can defer the experiment setup. Control here obviously isn't as fine grained as manually setting up the experiments but this would remove the need to know where the experiment.js file is, remove the need to remember to explicitly define your experiments later on, etc..//

We also considered this and think it's a good idea to wrap those includes in a template tag (i.e. {{{ {% initializeexperiments %} }}}) but chose not to do it in the short term in the interests of getting it out faster. I don't think you can combine the tags because the {{{experiments.js}}} and {{{experiment_enrollment.html}}} ought to be included from some master template that is extended by all of your other templates, whereas {{{ {% clientsideexperiment %} }}} should be located visually close to your test (ideally, it is only rendered by people actually seeing your experiment, because this tag causes users to be enrolled in the experiment, affecting the numbers).

Comments (0)

  1. Log in to comment