Platform

Experiments and feature flags from your own server.

Use the same visitor and the same bucketing on the server as in the browser: Node 18+, Cloudflare Workers, Shopify Oxygen, Deno and other fetch-based edge runtimes.

A flag in a few lines

Read a flag or an experiment's variant where your page is built, and send events from the server.

  • Zero dependencies. It caches the store's config and batches events.
  • Never throws: on any error you get your default value, and the error goes to your handler.
  • Checked against the storefront script: 10,000 visitors got the same variant on both sides.
TypeScript
import { createClient, visitorFromRequest } from "@bestconvert/node";

const client = createClient({
  siteKey: "pk_…",
  serverToken: process.env.BENCHMYRK_SERVER_TOKEN,
  baseUrl: "https://benchmyrk.com",
});

export async function loader({ request }) {
  const { visitorId, attributes } = visitorFromRequest(request);
  const newCheckout = visitorId
    ? await client.getFlag("new-checkout", visitorId, false, attributes)
    : false;
  return { newCheckout };
}

The SDK isn't on npm yet; we share it on request.

New feature flagDemo data

Flags that carry values

A flag is an experiment whose versions are values instead of page changes.

  • Any JSON value

    On or off, text, a number or JSON up to 8 KB. The off value lives in the control.

  • Rollouts

    Give the flag to a share of visitors, then raise it with a staged rollout; raising the share never moves a visitor between versions.

  • Optional results

    Add goals to measure each value with the same statistics as every test, or run a plain rollout without them.

  • Same targeting

    Location, Markets, device, page, traffic source and audience rules, answered from what you pass.

  • Exclusion groups

    Keep a flag apart from other tests that touch the same visitors.

  • Never on the storefront

    Flags aren't sent to the storefront script and can't carry page changes, scripts or redirects.

Server tokens built for servers

Owners and admins create a server token per store. It's shown once and only a hash is stored. The endpoints refuse requests that come from a browser and never send CORS headers, so a token can't be used from a web page.

  • Up to 10 active tokens per store; revoking one works on the next request.
  • Events are deduplicated for 48 hours, so retries never count twice.
  • Server exposures and conversions join the same visitor's storefront events and Shopify orders.

Good to know

  • Server events are exposures and named events. Orders keep coming from Shopify, the storefront script or the orders API.
  • Config changes reach servers within the cache time (30 seconds by default).
  • A Hydrogen package comes later; Hydrogen loaders can use the SDK today.

Questions

Does the server agree with the storefront?

Yes. Both use the same visitor id, bucketing and targeting code. In our parity test, 10,000 visitors got the same variant from the server SDK and the storefront script.

What happens if Benchmyrk is unreachable?

The SDK keeps the last config it fetched and retries in the background. If it has none, getFlag returns your default value; it never throws.

How does it handle consent on Shopify?

Shopify keeps consent in the browser. Let the storefront create the visitor id once analytics are allowed, and serve your default until requests carry it.

Testing beyond the storefront?

We'll go through the server SDK and feature flags with your developers. Or install the Shopify app and try flags on your store.