README
Couillard
Couillard is a small trebuchet you aim and launch at your users. It's a lean A/B testing tool to validate hypotheses and determine what to build.
More About Lean A/B Testing
- Unit 3 Module 1: An Introduction to Experimental Product Development
- Unit 3 Module 2: A/B testing overview
- Unit 3 Module 4: Guidance on Experiments
- Tech planet 2014 트랙2 세션5 Nell Thomas
- Emily Robinson - A/B Testing in the Wild - 2017-07-26
Install
yarn add couillard
Usage
// Your metrics store, can be Segment, Amplitude, SQL, mongo, or whatever you like.
const saveMetrics = metrics =>
fetch('...', {
method: 'POST',
body: JSON.stringify(metrics)
})
// Create variation A component.
const WelcomeA = props => (
<p>
Welcome I'm experiment A, {props.name},
<button onClick={hit('welcome', saveMetrics)}>Click Me</button>
</p>
)
// Create variation B component.
const WelcomeB = props => (
<p>
Welcome I'm experiment B, {props.name},
<button onClick={hit('welcome', saveMetrics)}>Click Me</button>
</p>
)
// Aim your experiment at your users.
const Welcome = aim('welcome', 50, saveMetrics, {
A: WelcomeA,
B: WelcomeB
})
// Only WelcomeA or WelcomeB will render.
const Home = () => {
launch('welcome', saveMetrics)
return (
<div class={style.home}>
<h1>Home</h1>
<Welcome name="Jannette" />
</div>
)
}
export Home