A/B testing on Cloudflare
Cloudflare caches your pages at the edge, and AB Splits runs in the visitor's browser, so the two work together: everyone gets the same fast cached HTML and the snippet decides which version they see.
Free plan · 1,000 visitors / month · no card
Set up in 3 steps
- 01Add the snippet to the <head> of your site or your Cloudflare Pages template.
- 02If Rocket Loader is on, add data-cfasync="false" to the script tag so it loads straight away.
- 03Deploy or purge the cache, then click Check install in AB Splits.
HTML <head>
<script data-cfasync="false" src="https://absplits.com/s.js" data-key="YOUR_SITE_KEY"></script>Your real site key is shown in the dashboard after you add your site.
- You don't need to purge the cache to start or stop a test. Test settings are fetched by the snippet, not baked into your pages.
What to test on Cloudflare
All 56 examples →Lead with the outcome, not the product category
Default the pricing toggle to annual
Move customer logos above the fold
One hero button instead of two
Answer the #1 objection above the plans
Highlight the middle plan as 'Most popular'
AI writes variants
Choose a headline or button and AI reads your real page to write 3–5 alternatives, each with its reasoning.
Honest stats
Chance to beat the original, 95% intervals, and a plain keep-running or stop verdict. No p-value guesswork.
Results in GA4
Every tested visitor is tagged in GA4, so any report can be split by variant.
Questions
Does Cloudflare caching break A/B tests?+
No. Variants are applied in the browser, so the cached page is identical for everyone. That's what lets testing and edge caching work together.
Do I need a Cloudflare Worker?+
No. A Worker is only needed for server-side splits. AB Splits runs from one script tag, so there's nothing to deploy at the edge.
Will A/B testing hurt my SEO?+
No, not when it's done properly. AB Splits shows each human visitor one version, and search bots and crawlers always see your original page. Tests on separate URLs keep your canonical tags, so ranking signals stay on the original page. End tests when you have a result and ship the winner.
A/B testing on other platforms