This sample app accompanies the article: A/B Testing with ConfigCat and Google Analytics.
The app is a quiz where users listen to an animal sound and then choose the correct animal name from four options. The quiz app was built using Vue.js.
We’re running an A/B test with ConfigCat and Google Analytics to see if highlighting the answer will encourage users to play more.
Control
Variant
- Node v20+
- A ConfigCat account
- A Google Analytics account
Follow these steps to run this project on your computer:
-
Clone the repository:
- Click the green "Code" button on the repository's page and copy the URL in the text field.
- Paste and run the following in your terminal:
git clone https://github.com/configcat-labs/configcat-google-analytics-integration.git
.
-
Install the dependencies:
cd configcat-google-analytics-integration
npm install
- Enter your ConfigCat SDK key in
main.js
. - Enter your Google Analytics Measurement ID in
index.html
. - Run the project:
npm run dev
Useful links to technical resources.
- ConfigCat percentage targeting guide
- Creating Audiences in Google Analytics
- Google Analytics reports guide
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!