2 ms·
Thanks -- PHP developers need better alternatives for A/B testing than Google Website Optimizer. Your code is about the minimum viable A/B testing library for
by patio11 16y ago
Thanks -- PHP developers need better alternatives for A/B testing than Google Website Optimizer. Your code is about the minimum viable A/B testing library for a developer: you can use it to start getting your feet wet with A/B testing done the right way.
I think if you start using it in production you will quickly understand that some of the implementation choices you've made are going to cause you pain, but that is less important than doing A/B testing. You can always rewrite the internals later. (I've done it a few times.)
- sdrinf 16y agoThanks. Would you mind pointing out implementation choices, that will come back biting us down the road? :)
- deleted 16y ago[deleted]
- patio11 16y agoYour mileage may vary, and I don't guarantee I'm reading your code right, but: 1) You will find it useful to be able to coerce A/B test values, particularly in testing and sometimes (for CS purposes) on the live site. 2) I do not see a convenient method of having Ms. Smith get the same website at home and at her workplace. That may or may not be a problem for you. 3) You may find "control" and "experiment" to be limiting once you start doing this frequently -- they aren't nearly as self-documenting six months down the line when you're staring at your web page wondering "What possessed me to make this button teal?!" 4) I'm pretty sure you have a race condition for creation of new tests. (This has bitten A/Bingo a few times.)
- tomjen3 16y agoI do not see a convenient method of having Ms. Smith get the same website at home and at her workplace. That may or may not be a problem for you. How did get this to work with A/Bingo? Did you "just" write the A/B tests such that they are tied together with the user database?
- patio11 16y agoA/Bingo has a notion of "identity" (a string which is unique among users of an application). If you don't have one, you get one assigned randomly. Your identity gets associated with your account as early as possible, and if you sign in on another computer, I overwrite that computer's identity with yours. (Merging would be cleaner, but this works in practice for my site.) The way A/Bingo picks alternatives guarantees that someone with a particular identity will always see the same alternative for a particular test. See the source code for details. Since identity management is abstracted by the A/B testing framework, you can make it as simple or complex as you want, and it hooks into user management with on the order of ~5 lines of code.
- tomjen3 16y agoNice, thanks.