Skip to content

ab.js is an unobtrusive javascript A/B-testing tool.

License

GPL-2.0, MIT licenses found

Licenses found

GPL-2.0
GPL-LICENSE.txt
MIT
MIT-LICENSE.txt
Notifications You must be signed in to change notification settings

andersmattson/ab.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ab.js - an unobtrusive A/B testing tool written in Javascript

ab.js is an easy to use, unobtrusive A/B testing tool written completely in Javascript. It works by randomly changing the content of DOM elements and generating unique (dummy) querystring parameter for anchor tags that can be tracked using Google Analytics or any other statistics program.

A/B testing is a really easy way of testing what works and what don't. Visitors to the site are randomly presented with different content and what works is measured by the clicks on the generated links in the different content.

The syntax is: AB.vary(settings, variation 1, variation 2, ...)

The following example would test two cases of content and style for an element with id "mylink", the original one and the one specified in the function call: AB.vary({ name: 'test_id', elem: document.getElementById('mylink') }, { html:'Buy this', style: { color: 'red', fontWeight: 'bold' } });

Testing more than two cases is just a matter of adding another object after the first one: AB.vary({ name: 'test_id', elem: document.getElementById('mylink') }, { html:'Buy this', style: { color: 'red' } }, { html:'Buy that', style:{ color: 'blue' } });

ab.js is dually licensed under the GPL and MIT licenses.

Current version is v0.3.

Roadmap for ab.js v0.4

  • [COMING SOON]

About

ab.js is an unobtrusive javascript A/B-testing tool.

Resources

License

GPL-2.0, MIT licenses found

Licenses found

GPL-2.0
GPL-LICENSE.txt
MIT
MIT-LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published