Skip to Content

Examples

Examples

Runnable example projects for every supported framework

1 min read

Each example below wires Improve into a specific framework. They all run the same A/B test (startpage-visual) so you can compare how the integration differs between a static site, a client app and a server rendered app.

A live store

Photo Studio is a Next.js storefront on Shopify whose every page is prerendered, yet each visitor's tests and flags are decided before the first paint: in code, and in Content's pages. Numbers counts their goals through to paid orders, and its source is public.

Client side

Render the control on first paint and swap to the visitor's variant once the SDK mounts in the browser. Simplest to set up, but causes layout shift (CLS) for content above the fold.

Server side

Decide the variant before the response is sent, so the first paint already matches the visitor's variant: no layout shift. For a page you can prerender, see our recommended setup: Server-side tests on static pages.

On this page

Marks in the margin

  • Note
  • Watch out
  • Updated

Scribes marked doubtful lines in the margin. That practice is called obelism.