Add A/B tests to any website with just HTML attributes. No frameworks, no complex setup.
Free • 2KB minified • No signup required<!-- Add A/B test to any element -->
<div class="abtest" data-abtestid="hero-button">
<button data-abtext="Sign Up|Get Started|Join Now"
data-abtrack="conversion">
Sign Up
</button>
</div>
<script src="https://cdn.abtesthero.com/abtesthero.min.js"></script>
<script>
// Initialize and run (get API key from console first)
abtesthero.init({apiKey: 'ak_your_key', user: {id: 'user123'}});
abtesthero.runAll();
</script>
Three simple steps to start A/B testing
Open browser console (F12) and run this command to get your free API key:
// Run this in browser console (F12)
abtesthero.createApiKey('you@example.com');
// Copy the API key from console output
Add test attributes to any HTML element you want to test:
<div class="abtest" data-abtestid="my-test">
<h1 data-abtext="Hello|Hi|Welcome">Hello</h1>
<button data-abtext="Sign Up|Join Now|Get Started"
data-abtrack="conversion">
Sign Up
</button>
</div>
Initialize with your API key and run all tests:
// Initialize with your API key
abtesthero.init({
apiKey: 'ak_your_key_here',
user: {id: 'user123'}
});
// Run all tests on the page
abtesthero.runAll();
All modern browsers and frameworks supported
Copy, paste, and start testing in 30 seconds
<!-- 1. Include the script -->
<script src="https://cdn.abtesthero.com/abtesthero.min.js"></script>
<!-- 2. Add your A/B test -->
<div class="abtest" data-abtestid="hero-section">
<h1 data-abtext="Welcome|Get Started|Join Us">Welcome</h1>
<button data-abtext="Sign Up|Get Started|Join Now"
data-abtrack="conversion">
Sign Up
</button>
</div>
<script>
// 3. Initialize (get API key from console first!)
abtesthero.init({
apiKey: 'ak_your_api_key_here', // Get this from console
user: { id: 'user123' }
});
// 4. Run all tests
abtesthero.runAll();
// View results at: app.abtesthero.com/d/{test-id}
</script>