House, An A/B Testing Framework for Node
The House Always Wins
A/B Testing is great. It makes you lots of money. Everyone likes money.
The mega-geniuses out there make it seem complicated. It doesn't have to be.
What is A/B Testing?
Look at it this way.
Let's say you run a burger joint, Bill's Burgers.
You and your co-owner, have a disagreement, over the name of the burger special, "Super Bagel Burger." She thinks it would sell better if it was called the "Ultra Bagel Burger."
This point is bitterly debated for many long years. Finally, you have an idea.
Half the customers who come in will be offered the "Super Bagel Burger." The other half will be offered the "Ultra Bagel Burger."
You tally up the exact number of burgers each customer group buys. After 1,000 customers, you see that 352/500 have bought Super Bagel Burgers, and 256/500 have bought Ultra Bagel Burgers. You now know the Super Bagel Burger does sell better (37.5% better!), and you can prove it.
A/B testing when applied to web-based enterprises works basically the same way.
In order to use this module, you have to import the
house module and create a new
ab test, then set that test up as a route in Express. Here's a working example...
let express = ;let house = ;let app = ;let ab = ;let port = processenvPORT || 7777;abname`Group A - elite controller offer page (multiple)`;abname`Group B - elite controller main page`;app;appapp;
What is it?
House.js is basically express Middleware that randomizes the outcome. It's perfect for A/B testing and easy to use. There is support (not yet implemented) for sending additional requests to analytics endpoints.