Shopify theme · A/B framework
A conversion-optimised Shopify theme for a spirits brand, with experiment assignment, a fail-closed age gate and off-domain checkout instrumentation built into the theme rather than bolted on as an app.
You will meet the age gate first — that is the point of it.
<body> establishes the closed state; JavaScript's only job is to open it. JS disabled, a thrown script, or a 404 on any asset all leave the gate up and the content hidden.| URL | What it does |
|---|---|
| ?ab=age_gate:b | Forces the birthdate age gate instead of the one-tap version |
| ?ab=hero_image:b | Forces the alternate hero image |
| ?ch=ig&ab=bundle_offer:b | The $199.99 bundle offer, which replaces the single-bottle CTA. Needs ch=ig — the experiment only enrols Instagram traffic |
| ?ch=ig&ab=bundle_offer:a | The control for that test — the single bottle at $69.99 |
| ?ab=reset | Clears assignments and re-buckets you |
| ?agegate=reset | Re-opens the age gate after you have confirmed |
| ?debug=1 | Shows the live GA4 event inspector |
| ?flow=focus | The stripped-back view served to paid-social traffic |
| ?ch=ig | The Instagram landing — visual-led headline |
| ?ch=tt | The TikTok landing — hook headline, tighter fold |
| ?ch=fb | The Facebook landing — nav kept on desktop |
This demo does send analytics. It is wired to a real GA4 property so the funnel can be verified end to end, and page views, age-gate outcomes, experiment exposures and cart events are recorded. Nothing identifies you, and no personal data is collected or requested. If you would rather not be counted, do not proceed past the age gate — nothing is sent until you do.
The cart is a mock. No order can be placed, no payment
details are ever requested, and nothing reaches a retailer. Add
?debug=1 to any URL to watch the exact event stream this page
produces.
Standard Shopify theme layout — layout/, sections/,
snippets/, config/, assets/. Every
experiment, colour and font is a theme setting, so re-skinning means editing
settings rather than code. preview/ is a static mirror of the
rendered theme so it can be served without a Shopify store.
See the README for the full reference.