Code Monkey home page Code Monkey logo

split-test's Introduction

Split Test Plugin for Grails

Performing A/B tests in your grails application allows you to make informed decisions on design and user experience based on visitors actions. The information is gathered by placing a simple tag on your view, then a trigger on your controller to inform the plugin that the user was successfully converted.

Some of the key features of this plugin are:

  • Test display or behavioral differences with one simple taglib <ab:splitTest>
  • Measure not only conversions, but steps along the way (up to 3 - see below)
  • Analytics on visitor behavior and which paths they are likely to convert better on
  • Very fast, with minimal performance impact
  • Beautiful admin tool (/splitTests) based on Twitter Bootstrap

Screenshots to follow

Quick Start

A split test is comprised of placing a taglib in a view. The taglib will contain the default contents of which are to be shown if the test is not enabled. For example:

<ab:splitTest name="My First Split Test">
    This is my default content that appears when the test is disabled.
</ab:splitTest>

When this page is viewed by a visitor, a Split Test is automatically added into the Split Test list. Note that it is not active by default.

To trigger the conversion, you can do this via the splitTestService in your controller:

class ExampleController {

    def splitTestService

    def converted() {
        // Mark split test with name 'My First Split Test' as converted
        splitTestService.markTestAsConverted('My First Split Test')
    }
}

You can also trigger different conversion metrics using the Action 1-3 triggers:

class ExampleController {

    def splitTestService

    def almostConverted() {
        // Mark split test as converting on Action 1
        splitTestService.markTestAsActionOneConverted('My First Split Test')

        // Mark split test as converting on Action 2
        splitTestService.markTestAsActionTwoConverted('My First Split Test')

        // Mark split test as converting on Action 3
        splitTestService.markTestAsActionThreeConverted('My First Split Test')
    }

    def converted() {
        // Mark split test with name 'My First Split Test' as converted
        splitTestService.markTestAsConverted('My First Split Test')
    }
}

Admin Tools

The split test variants are controlled within the admin tools.

You can access the admin by going to /SplitTest in your app.

The app is secured by a simple authentication. The default username and password is admin and changeit. You can change the username/password by adding the following into your Config.groovy file:

// Set username and password split-test admin
grails.plugins.splittest.username = 'newusername'
grails.plugins.splittest.password = 'newpassword'

More documentation is to follow on how to use the admin tools, but it is fairly well documented with the admin, so please check it out.

split-test's People

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.