jeandenis edited this page Nov 23, 2012 · 1 revision
Clone this wiki locally

Three Page App

This is a trivial three-page webapp that shows you how to use multi-page a/b tests using bestcase.

You can run this example by cloning the bestcase-examples repository and using lein ring server.

  • The first page ("/") has some text the background-color of which is determined by :color-test (red, green, blue).
  • The second page ("/second-page") contains two tests. The first test is the same :color-test as the first page. This is done to show the user how a test can across multiple pages and show that user a consistent experience. The second test is called :text-test and is an example of how one test can affect the same page in different sections by having the test return a map as opposed to html/hiccup
  • The second page also contains a button to do a "conversion".
  • The third page ("/second-page") prompts the user to access the bestcase dashboard to see results.
  • On the first two pages, the user can also force a certain alternative using params of the form: &test-name=alternative-name (no leading ":" necessary). The second page highlights this.

Note: You may want to access the tests from a number of different browsers/users in order for the result dashboard to be meaningful.

See the code