Skip to main content

Documentation Index

Fetch the complete documentation index at: https://arkticstudio.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Visitor identification

Each visitor gets a random 128-bit ID (spt_vid cookie) on their first visit. This ID is set for 1 year and is used for all bucketing decisions. The same visitor always gets the same variant.

Bucketing

Split Tester uses FNV-1a hashing to deterministically assign visitors to variants:
bucket = fnv(visitorId + ':' + experimentId) % 100
The bucket value (0–99) is compared against cumulative variant weights. For a 50/50 split, visitors with bucket 0–49 get the control and 50–99 get the variant. This approach means:
  • No database lookup needed on the storefront (zero latency)
  • The same visitor always gets the same variant across sessions
  • Adding a new experiment doesn’t affect existing assignments

Traffic allocation

Before bucketing into a variant, each visitor is first checked against the experiment’s traffic allocation:
allocBucket = fnv(visitorId + ':' + experimentId + ':alloc') % 100
if allocBucket >= trafficAllocation → visitor is excluded
A 50% traffic allocation means only half of all visitors enter the experiment. The rest see the default experience and are not tracked.

Assignment persistence

Once a visitor is assigned, their assignments are stored in the spt_asgn cookie as a JSON map:
{ "experiment-id-1": "variant-id-a", "experiment-id-2": "variant-id-b" }
This ensures consistent experiences across page loads and sessions.

Config delivery

Experiment configuration is stored in a Shopify shop metafield (split_test_app.config). The theme embed reads this at Liquid render time and injects it as window.__SPT_CFG_INLINE__ — so there are zero API calls on the critical path.

Event tracking

After bucketing, the JS fires:
EventWhen
PAGE_VIEWEvery page load
ADD_TO_CARTForm submit to /cart/add, cart drawer events, or ATC button click
INITIATE_CHECKOUTCheckout button click or form submit to /checkout
Events are sent via navigator.sendBeacon (fire-and-forget, non-blocking).

Order attribution

When an order is created, Shopify fires a webhook. Split Tester reads the _spt_vid and _spt_asgn cart attributes (written by the JS on every page load) to attribute the order to the correct experiment and variant.

Results rollup

Results are computed hourly. Each rollup window aggregates sessions, conversions, revenue, and statistical metrics (p-value, lift %) per variant. Clicking ↻ Refresh results triggers an immediate rollup.