Skip to content
GROWTH DEPT.CRO

Cloudflare Workers + Growth Dept CRO

Run tests on pages Shopify does not serve, such as a landing page on its own domain in front of your Shopify checkout.

  • Groups decided at the edge, before HTML reaches the browser
  • Split URL pages served under the original address
  • Cart links carry the visitor's groups into checkout
Deploy the Growth Dept CRO Worker as a route in front of a static or custom site. It decides each visitor's group, rewrites the page for that group and sends the exposure, all inside the request.

At a glance

Does Growth Dept CRO work with Cloudflare Workers?

What does it suit?

Static or custom HTML served through Cloudflare, for example a landing page on its own subdomain that sends shoppers to a Shopify checkout.

How are split URL tests served?

The group's page is fetched from its own path and served under the original URL.

How are content tests applied?

The Worker writes each group's hide rules and the ready mark into the page's head with HTMLRewriter.

How do orders carry the group?

Links to your store's /cart/<variant>:<quantity> permalinks get the visitor's _cro attribute and UTM parameters added.

What does it need?

Your brand's public key, and optionally your store's host and an origin to fetch pages from.

How it works

How Cloudflare Workers and Growth Dept CRO work together

At the edge

The Worker reads the published set-up, decides the group and sets the cookie in the same request.

Rewritten HTML

Split URL pages are swapped and content groups are written into the head before the browser sees anything.

Exposures counted

Exposures go to the collector with waitUntil, so they never delay the page.

Get started

To get started

  1. 01

    Deploy the Worker

    Add the Growth Dept CRO Worker as a route in front of the site.

  2. 02

    Set its variables

    CRO_PUBLIC_KEY with your brand's key; CRO_STORE_HOST when checkout runs on your Shopify domain.

  3. 03

    Check with QA links

    Open each group's preview link and check the cart links carry the group.

What it works with

Split URL testsContent testsFeature flags

FAQ

Cloudflare Workers questions

What happens on a cold start?
A cold Worker serves the page untouched, or waits a short time you set, while it fetches the set-up. Cloudflare's cache then holds the set-up for 30 seconds.

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.