Skip to content
GROWTH DEPT.CRO

For in-house engineers

Full control in code, with the statistics done

CSS and JavaScript per group, feature flags, Next.js and Cloudflare installs, a dataLayer event and an API with scoped keys.

middleware.ts
import { croMiddleware } from "@growthdept/cro-runtime/headless"; export default async function middleware(req, ev) {  // the group is decided here, before the page renders  return (await croMiddleware(req, ev, {    publicKey: process.env.CRO_PUBLIC_KEY,  })) ?? NextResponse.next();}

What gets in the way

What engineers usually get from a testing tool

A heavy script

A tag that loads after the page and swaps content in front of the shopper.

A closed box

No way to create or read tests from code.

Theme only

Nothing for a headless storefront or a page Shopify does not serve.

How Growth Dept CRO helps

Built for the way you ship

Decided before paint

On a theme the set-up is inlined, under 6 KB gzipped; on headless the middleware decides on the server.

Code per group

CSS and JavaScript on any group, up to 8 KB each; flags read with window.CRO.flag().

An API and webhooks

Create drafts, start and end tests, read results; signed webhooks for each step.

What you get

The pieces engineers ask for

Flags

Read a flag

One call on the theme, a header on headless.

Events

Your own goals

window.CRO.track() sends a custom event a test can count.

API

Scoped keys

Keys carry only the scopes you choose.

Webhooks

Signed deliveries

HMAC-SHA256 over the timestamp and body.

Find out what is worth testing on your store.

Book a 45-minute call with the Growth Dept team. We look at your store and your traffic, and tell you which tests to run first.