This repository contains the accompanying sample code for the blog article titled 'How to Conduct an A/B Test in Elixir' The application relies on a web-based framework for Elixir called Pheonix to serve the app through the browser. To conduct the A/B test experiment, I've integrated ConfigCat feature flags for switching between and deploying each version to the user sample set. Additionally, I've incorporated Amplitude's data analytics platform to track and compare the clicks from each version, to decide on the best one.
- An installation of Elixir
- An installation of Pheonix - A framework for building Elixir-based web apps.
- Clone this repository
- Create a
.env
file in the root of the repo with the following content. Then replace the placeholder values with your own:
AMPLITUDE_API_KEY="YOUR-AMPLITUDE-API-KEY-GOES-HERE"
CONFIGCAT_SDK_KEY="YOUR-CONFIGCAT-SDK-KEY-GOES-HERE"
- Install the dependencies:
mix setup
- Start Phoenix endpoint with:
mix phx.server
Now you can visit localhost:4000
from your browser.
Useful links to technical resources.
ConfigCat also supports many other frameworks and languages. Check out the full list of supported SDKs here.
You can also explore other code samples for various languages, frameworks, and topics here in the ConfigCat labs on GitHub.
Keep up with ConfigCat on X, Facebook, LinkedIn, and GitHub.
Contributions are welcome!