Article

Choose an experimentation platform layer by layer

Write A/B testing and personalisation requirements per layer, from browser and edge to server, API and app, before you compare vendors.

Published Updated 10 min read

Vendors of A/B testing and personalisation tools publish long feature lists, and most of those lists look alike. The real differences show where a decision happens: in the browser, at the CDN or edge, during server-side rendering, in an API or in a native app. This guide shows how to write requirements per layer before you compare vendors, how to make gaps and owners visible, and how to plan a proof of concept that measures the cost of an SDK. It is written for architects and tech leads of web and app teams, and it is vendor-neutral.

Start from where a decision can happen

A web request passes the layers in a fixed order: the CDN or edge, then the server that renders the page, then the APIs that the server calls, and last the browser. A native app is a separate surface. It calls the same APIs, and it should share segments, and ideally experiment configuration, with the web.

Each layer knows different things, so each layer is good at different decisions.

Layer What it knows Good for Main risk
CDN or edge URL, headers, cookies Variant assignment, URL rewrites, a different origin per variant A fragmented cache
Server (SSR) The request plus session data, such as login state Page structure, checkout and account flows Extra time to first byte
API Only what the caller sends Content, recommendations or prices per segment Each layer resolves the segment again
Browser The rendered page and user interaction Copy and visual changes, client components Flicker, render delay, bundle size
Native app Device, OS, app version, user In-app variants and feature flags The store release cycle

Decide as early as you can, and pass the decision on. If the edge assigns the variant, send it to the server in a header. If the server knows the segment, send it to the API with the request. Then every layer acts on the same context, and you can log the segment and variant with each response.

There is also a performance reason to decide early. The web.dev guidance on third-party JavaScript says that A/B testing scripts often delay rendering. Most of them block content display until they finish, and this can be true even when they load asynchronously. It recommends that you decide on the server which version of the page to show.

Write requirements per layer with MoSCoW

Give each layer its own list. Write each requirement as behaviour that you can observe, not as a feature name. “A visitor in variant B stays in variant B on the next page” is testable. “Supports sticky bucketing” is a label that every vendor will tick.

Use the MoSCoW definitions from DSDM:

  • Must Have: part of the Minimum Usable SubseT. Ask “what happens if this requirement is not met?” If there is no point in using the solution without it, it is a Must. If a workaround exists, even a manual and painful one, it is a Should or a Could.
  • Should Have: important but not vital. Leaving it out can hurt, but the solution is still viable.
  • Could Have: wanted, but less important, with less impact if you leave it out. This is the main pool of contingency.
  • Won’t Have this time: agreed as out of scope for this timeframe. You record it to make the scope clear, so nobody adds it again informally.

DSDM advises that Musts take no more than 60% of the effort, and that Coulds take about 20%. In a vendor selection you do not count effort, but the idea still helps. If almost every line is a Must, the list no longer separates one vendor from another.

Here is an example for a headless storefront with a React Native app:

Layer Requirement Priority
Browser A marketer launches an experiment without a code deployment. Must
Browser A visitor in variant B stays in variant B on the next page. Must
Browser The SDK wraps React components in feature flags, instead of injecting DOM changes. Should
CDN or edge Variant assignment happens at the edge, without an extra request to the server. Must
CDN or edge Two variants of one URL do not lower the CDN cache hit rate. Must
Server The server resolves the variant before it responds, so the page never switches during load. Must
API The API receives the segment in the request and does not resolve it again. Must
API Every response is logged with its segment and variant. Should
App A React Native SDK is available. Must
App JavaScript-only changes reach a group of users without a store release. Could
Email Experiments in email. Won’t Have this time

For each Must, write down how the proof of concept will verify it. A Must that nobody can test is a wish.

Over-the-air updates are a separate capability from experiments. For React Native, Expo Update is one example: it lets an app update its non-native parts, such as JavaScript, styling and images, between store submissions. To keep application code independent of one vendor, look at OpenFeature, an open specification with a vendor-agnostic API for feature flags. A provider translates the API calls to the flag system that you use. Check per layer whether a provider exists for the tools on your shortlist.

Make missing requirements and owners visible

An empty section reads as “no requirements”. Write “pending” instead, with an owner and a date. Keep the open questions in the same document as the requirements, so readers see the gaps next to the decisions.

Open question Why it matters Owner (role)
How does the tool sync segments with the CDP: API, webhook or native integration? Web and app must use the same segments. Personalisation lead
Does the edge integration work out of the box, or does it need custom engineering? The edge Musts depend on it. Platform architect
Do web and app use one interface, or separate products? It changes the workflow for marketers. Product owner
Which segments are live today? Targeting requirements depend on them. CDP owner
Who owns the vendor decision, and when must it land? Without an owner, the evaluation stalls. Sponsor
Is there server-side tracking, and who owns the gap? Edge and server experiments need exposure data outside the browser. Analytics lead

Give every line a due date. Show the review state per layer too: drafted, reviewed or signed off. A layer that waits for a review is a risk to the timeline.

Check the prerequisites as well. If you have no server-side tracking, an experiment at the edge or on the server cannot report exposures without help from the browser. Close that gap first, or accept that those layers wait.

Set cache rules before you test at the edge

Experiments at the edge can damage your cache hit rate. The Fastly A/B testing tutorials describe a pattern that prevents this:

  1. Give each visitor an ID in a cookie. Assign the bucket by hashing the ID together with the test name, so the same visitor gets the same variant on every request.
  2. Make sure the browser does not cache the response that sets the cookie.
  3. Remove the visitor ID before the request goes to the origin. If the origin varies content by ID, the CDN cannot cache it well.
  4. Send the bucket of each test in its own request header.
  5. Let the origin list the headers that it used in Vary, so the CDN stores one copy per combination that matters.
  6. Run the assignment once per request, at the edge, and not again on a shield or restart.
GET /products/hand-cream HTTP/1.1
Host: www.example.com
X-Test-Hero: b
X-Test-Checkout: control

HTTP/1.1 200 OK
Cache-Control: public, max-age=300
Vary: X-Test-Hero

The product page uses only the hero test, so it varies on that header only. The checkout test does not split the cache of this page.

Variants multiply. Two tests on one page, with 2 and 3 buckets, give 6 versions of that page. Fastly stores up to 200 variations of a resource. MDN adds two rules for Vary: use the same value on all responses for a URL, and avoid Vary: *, because it makes the response uncacheable. Add a requirement for the maximum number of versions per URL, and measure the cache hit rate before and during the test.

Plan a proof of concept that measures SDK cost

A feature list does not show cost. A proof of concept does. Test every candidate on the same page, in the same build, with the same measurements.

Measurement How Layer
Bundle size Compressed bytes of the SDK and its configuration, number of requests and third-party domains Browser, app
Flicker and render delay LCP element render delay and CLS, with and without the SDK Browser
Decision latency Time from request to variant, cold and warm Edge, server, API
Time to first byte TTFB with and without the decision on the server Edge, server
Cache impact CDN cache hit rate before and during the test Edge
Scale All of the above with 1, 20 and 50 active experiments, because fast with one is not always fast with fifty All
Failure Behaviour when the vendor is slow or down: timeout and default variant All

The web.dev guide to LCP names one cause of element render delay that fits this topic: an A/B testing library that hides the element while it decides the experiment. So measure render delay, not only load time. To isolate a third party, web.dev suggests that you measure the page, block the third-party domains in Chrome DevTools or WebPageTest, and measure again, at least three times. After the selection, a performance budget for third-party content keeps the cost visible.

Lab tests show the cost on one device. Field data shows it for real users. Tag your RUM data with the variant, so you can compare Core Web Vitals per variant. Datadog RUM has feature flag tracking in its Browser, iOS, Android, Flutter and React Native SDKs. The Browser SDK collects flag data on view and error events by default.

import { datadogRum } from '@datadog/browser-rum';

datadogRum.addFeatureFlagEvaluation('checkout_cta', variant);

Datadog does not support some characters in flag names, such as -, . and :, so use underscores. For the difference between lab and field numbers, see Lighthouse lab data vs RUM field data: what to report and when. For the RUM setup in Next.js, see Datadog RUM and APM for the Next.js App Router: setup and sampling costs.

In practice

For an international cosmetics retailer, described in the case study, we started a discovery of the testing and personalisation landscape in April 2026. Tools overlapped, and not every flow was mapped. Segments live in a customer data platform (CDP), and that CDP stays the orchestration layer, so a new tool must work next to it. There was no server-side tracking yet, so that gap had to be addressed first. Composability across layers became the key requirement.

In May 2026, we wrote the requirements per layer for the headless web and the app, with Must, Should and Could. The web part follows the request order: CDN, server, API and browser. The React Native app is a separate surface that shares segments, and ideally experiment configuration, with the web.

The review gave one useful lesson: avoid a “unicorn”, one tool that does A/B testing and personalisation but is weak on every integration. A good tool per integration point, plus an integration with the CDP, is often the better choice. The review also put web and app next to each other at the top of the structure, above the shared back ends. This post describes the method, not a tool choice.

Checklist

  • List the layers in your stack where a decision can happen.
  • Write requirements per layer as observable behaviour, with MoSCoW and a Won’t Have list.
  • Write for each Must how the proof of concept verifies it.
  • Give every open question an owner and a due date.
  • Decide which layer resolves the segment, and pass it downstream.
  • Count the cache versions per URL before you add tests at the edge.
  • Measure bundle size, render delay, decision latency and cache hit rate per candidate.
  • Repeat the measurements with a growing number of active experiments.
  • Tag RUM data with the variant, so you can compare field data.

For help with requirements or a proof of concept for an experimentation platform, see custom project.

Sources

Let's connect

Talk about your project

Tell us about your team and your problem. In 30 minutes we find out whether one of our offers fits, and if none does, we tell you.

Book a 30-minute call