Developer

Checkout-block experiments

Configures Shopify checkout-block experiment payloads and preview state for checkout-adjacent surfaces.

Simple terms

Checkout-block experiments configure supported Shopify checkout extension content instead of changing the storefront DOM.

Configures Shopify checkout-block experiment payloads and preview state for checkout-adjacent surfaces.

Routes

  • /tests/[id]/checkout-block
  • /api/experiments/[id]
  • /api/variations/[varId]

Implementation behavior

  • Checkout-block configuration is tied to an experiment and stores payloads that can be read by the Shopify extension or related runtime.
  • Preview state helps validate what a block will render before exposing it to eligible traffic.
  • Tracking still depends on the broader Apex event and revenue setup.
  • Because checkout is constrained, this path uses explicit configuration instead of arbitrary DOM mutation.

How to use it

  • Use this only for supported Shopify checkout-block surfaces.
  • Configure the block payload and preview it before launch.
  • Attach revenue or checkout-related goals that are actually trackable in the store's Shopify setup.
  • Keep block changes small and test them carefully because checkout surfaces are sensitive.

When not to use it

  • Do not use checkout blocks for normal product page, cart, or collection changes.
  • Do not test unsupported checkout surfaces with this feature.
  • Do not launch checkout changes without stricter QA because checkout regressions are high impact.

Implementation source

  • The page lives under src/app/(dashboard)/tests/[id]/checkout-block.
  • The editor saves checkout-block experiment configuration through experiment and variation update endpoints, with Shopify checkout-block config served separately for extension runtime.
  • The runtime depends on Shopify extension constraints plus Apex experiment and revenue-event attribution.

Data and API

  • Checkout-block configuration is stored on experiment/variation records.
  • APIs under /api/experiments/[id], /api/variations/[varId], and Shopify event/revenue endpoints.
  • Shopify extension/runtime data plus Apex events.

Failure modes

  • Block not visible: extension not installed, checkout surface unsupported, targeting miss, or preview context missing.
  • Revenue not attributed: Shopify event settings or experiment IDs missing from events.
  • Checkout regressions require immediate pause and rollback.