Edge + SDK A/B Testing — Zero Flicker
A/B tests that run
before the page loads.
Koryla runs experiments at the edge or inside your React, Vue, and Astro components — your visitors always see the right variant instantly, with no flicker and no performance hit.
Free plan available. No credit card required.
Two ways to run experiments
Choose the approach that fits your stack — or use both
Edge is for testing full page routes. SDK is for testing specific components within a page. Same API, same dashboard, same results.
Worker / Middleware
Middleware intercepts the HTTP request and rewrites it to the correct variant page — before any HTML is generated. The browser always shows the same URL, and visitors receive their variant from the first byte.
- ✓ Zero client JavaScript
- ✓ Works with Next.js, Netlify, Node.js
- ✓ Best for testing full page routes
// middleware.ts (Next.js)
import { korylaMiddleware } from '@koryla/next'
export default korylaMiddleware({
apiKey: process.env.KORYLA_API_KEY,
apiUrl: process.env.KORYLA_API_URL,
})React · Vue · Astro
Resolve the variant inside a server component, page, or layout. Render different content based on the result — server-side, with no client JavaScript. Best when you're testing a specific section within a page.
- ✓ Server-side, no JS overhead
- ✓ Works with React, Vue, Astro
- ✓ Best for testing components within a page
// pages/index.astro
import { getVariant } from '@koryla/astro'
const result = await getVariant(Astro.request, {
apiKey: globalThis._importMeta_.env.KORYLA_API_KEY,
})
// render control or variant BFeatures
Everything you need to run experiments
Zero flicker
Variant assignment happens before the HTML is generated. The browser always receives the correct page from the first byte — no layout shift, no flash.
Edge + SDK modes
Test full page routes with edge middleware, or test individual components with the SDK. Use both in the same project.
Multi-destination analytics
Pipe impression and conversion events to GA4, PostHog, Mixpanel, Segment, or your own webhook — simultaneously, with no extra code.
Sticky assignments
Every visitor is assigned once and stays on the same variant for 30 days. No re-randomization, no inconsistency across sessions.
Conversion tracking
Define a conversion URL and Koryla tracks it automatically. See impressions, conversions, and conversion rate per variant in real time.
No client-side JavaScript
No script tags, no external CDN, no dependency on a third-party service staying up. The integration lives entirely in your codebase.
Integrations
Works with your stack
Drop-in packages for the most popular frameworks and deployment platforms.
Next.js
Edge middleware or server components — assign variants before rendering, no client JS.
View docs →Nuxt
Nitro server middleware or page-level variant resolution. Any Nuxt SSR deployment.
View docs →Astro
Resolve variants in frontmatter server-side. Works with Netlify, Vercel, and Node adapters.
View docs →Netlify
Edge function that intercepts requests before your site renders. Any framework on Netlify.
View docs →Pricing
Start free, scale when you need to
No contracts. No sales call. Cancel anytime.
Blog
Latest posts
How server-side A/B testing eliminates flicker
Coming soon
Why we built Koryla instead of using an existing tool
Coming soon
Setting up your first experiment in under 5 minutes
Coming soon