Skip to content

durden/split_testing_playground

Repository files navigation

#A/B Testing Application

Simple app to:

##Why

I wanted to play around with some ideas to learn more about A/B testing. It's far from complete. It mainly serves as a platform for demonstrating one way to automate scheduling an A/B test for a given portion of time.

Using this approach, admin users could login and 'schedule' an A/B test. Then, the designer/developer could discuss the test goals with the admin and execute the code for the test with very minimal effort.

##Install

This application can be installed simply by installing the requirements designated in the requirements.txt file.

- pip install -r requirements.txt
- pip install -r chart_requirements.txt

Currently PIL and ReportLab are specified in the chart_requirements.txt file. These requirements are not stricly necessary to run the application. However, they allow the application to show a veritcal bar chart for conversion rates.

##Deploy

The application can easily be deployed to heroku by:

- git clone git://github.com/durden/split_testing_playground.git
- 'cd' into the application directory
- heroku create --stack cedar
- git push heroku master
- heroku run python manage.py syncdb

You can see the currently deployed version on heroku here.

###Usage


Run the application:

  • git clone git://github.com/durden/split_testing_playground.git
  • 'cd' into the application directory
  • Setup the database (unless you would like to use the provided one)
    • python manage.py syncdb (make sure to create admin account)
    • Again, this is an optional step since the git repo includes a sample database that will automatically be connected to.
  • python manage.py runserver
  • Browse to http://127.0.0.1:8000/
  • Login
  • Create an A/B test
  • Add A/B choices
  • Use the database IDs from these choices to show them in the template
  • For example see register template

I've provided a sample database that will demonstrate the basic use of the application. It includes a single A/B with a few choices. You can run the existing test by modifying the start/end dates of the test. You can also see that there are already 'fake' results included for demonstration.

**The login for the sample database is 'test_user' with 'password' as the password.

####Technologies Used


#####Improvement Ideas


  • Might be able to turn the main split testing view code into a decorator and more easily scale the idea to multiple views in the future
  • Add a template tag to somehow more gracefully handle the switching on/off different UI choices for the actual test in the template. I'm not too crazy about having to litter the code with a bunch of if statements, just haven't found a really good way to do it yet.
  • Devise a better way to refer to test choices
    • Currently the application only tracks a long description. This is useful, but it would probably be better to have a 'shorter' way to refer to them. This would look much better on the vertical bar chart x-axes.

About

Sample Django app to play around with ways to do A/B Split testing on a page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages