I recently wanted to conduct a little bit of A/B testing on a project of mine, so I went exploring – yet again – the free options.
There are lots of very good server-side solutions, but what I wanted was one that I didn’t need to configure on the server, and that could be integrated into Google Analytics, where I already track my websites performances. I found on the web some how-tos about the use of GA custom variables for A/B testing, but no ready-made libraries to do so.
These are the main features:
- Easy to set up
- You just list the possible variants, the randomization is handled automatically
- You just mark the html elements you want to test on with a class, the substitution is automatic
- No need to set anything up server side, all the results are stored on Google Analytics
- Consistent user experience: The selected variant is stored in a cookie, so the user will see the same one when coming back
- Flexible: You can conduct multiple, independent experiments at the same time. Each experiment will use a custom variable slot
I’m releasing the library with an MIT license, and you can find it – with basic instructions on how to use it - on Github. Enjoy!