You are about to split live traffic between the GitHub-connected theme and a second theme sitting in Online Store, and call that a clean replacement test.
The test stays clean only while both arms hold still. When you activate a theme-replacement Experiment, Shopify makes a separate copy of your live theme and serves that copy to control visitors until the Experiment ends. Call it the activation snapshot. Every GitHub deploy to the live theme after that moment misses the snapshot, while every price edit and product publish still reaches both groups.
Shopify staff confirmed that on 12 November 2026, answering our questions on the Shopify developer community forum, and they also confirmed how the theme reaches the browser. Theme selection is server-side: Shopify picks the theme before it returns the storefront HTML, renders that theme's Liquid on a cache miss, and serves that variant's cached HTML on a cache hit, with no client-side theme swap, redirect, or second page fetch.
Before you activate, write down how assignment, session lifetime, and the storefront page cache behave, then freeze or date every GitHub deploy so the activation snapshot and the treatment theme cannot drift while the test runs.
Does the first page view already carry the assigned theme?
Yes, for an eligible visitor making a normal storefront request, because assignment runs before theme selection and before cache lookup.
Shopify Rollouts are a scheduled set of changes to your online store's main theme, checkout and accounts pages, discounts, product catalogues, or a combination of those, and you manage them from Markets, then Rollouts. Types of rollouts names three kinds: a Launch that merges changes permanently, an Event that publishes for a set period and then rolls back, and an Experiment that compares a treatment against a control. Experiments need the Grow plan or higher, and a new Experiment defaults to an even split between control and treatment, with an end date 90 days after it starts.
Theme replacement came in the second release. The 31 March 2026 changelog introduced scheduling, timed events, and A/B tests against the current theme, and the 5 June 2026 changelog added A/B tests between two entirely different themes, with a copy of your published theme created automatically so you can keep editing the live theme independently from the experiment.
Creating a rollout says you add the replacement theme to your online store first, then select it in the rollout. Shopify's Admin API models that treatment as a RolloutThemePublishChange, which publishes a theme for the buyers that treatment serves without changing the shop's globally published theme. Apps that need to see those treatments request read_rollouts and query rollouts, as described in the 1 October 2026 developer changelog.
Shopify Help comes close to saying this. Rollout analytics says each visitor is put in a group before the page loads so the page does not flicker between versions, and that your theme and apps cannot read a visitor's group. Shopify staff added the missing detail on the forum, that the first HTML response can already be control or treatment with no control-first page view required.
For QA, open the normal storefront URL in a clean browser profile, look at the document's original HTML response in the Network panel, and find Shopify.theme, whose id names the theme that rendered the page. Theme preview links and editor sessions can override rollout theme selection, so keep them out of the check. A match with the replacement theme's ID confirms treatment, and because the activation snapshot has its own ID, distinct from the live theme, an ID that fails to match is not enough on its own to identify control. Shopify staff had not found a documented, supported response header that identifies the assigned group, so the HTML check is the practical one.
Theme assignment before the first HTML
How long does a visitor stay on one theme?
Record the session lifetime, because the cookie's own expiry is the wrong clock.
Shopify Help says the group is saved in an essential cookie, visitors stay in the same group until that cookie expires or is cleared, and a new browser or device gets a new group that might be different. If you change the traffic split during an Experiment, only new visitors are affected. Visitors get a group even if they do not consent to tracking, and only visitors who consent are counted in results. If both versions are displayed to a visitor in the same browser, that visitor is not counted in the Experiment's results.
The forum answer named the cookie as _shopify_essential, which references a stored session containing the visitor's identity and assignment. A new session that receives no further requests lasts two days. A subsequent request, including another page view during the same visit, can extend that to 90 days, and logged-in sessions use 365 days. Because those are session lifetimes, reading the cookie's expiry in the browser will not tell you how long the assignment will persist.
Copy those three lifetimes onto the worksheet before you activate. A follow-up answer added that the cookie is host-only, so it covers every page and market subfolder on one hostname without carrying over to sibling subdomains, and different storefront hostnames on the same shop can hold separate sessions and assignments. QA that opens a private window and then a second browser is testing as two visitors.
You cannot target a rollout to a customer segment, a customer tag, or a device. Creating a rollout says visitors are put in groups at random. A theme replacement always applies to all markets, so you cannot keep the Experiment inside one market the way a theme edit can.
Why can the same URL serve two HTML variants?
Because the storefront page cache keys on the visitor's assigned rollout flags.
A page cache is a stack of pages rendered in advance and handed out on request. This cache's key includes the rollout flags, so one URL can hold a separate stack of cached HTML for each variant, which is how control and treatment share a path without a redirect. That answer covered the storefront page cache, so the worksheet records that layer and nothing beyond it.
Analytics still need a separate note. Shopify Help says a rollout session is counted when a visitor in the rollout reaches a point where the rollout's changes could apply, and that a counted session does not confirm the visitor viewed or received the change. For an Experiment, results can include treatment sessions where the customer did not receive the treatment change. Results update a few minutes after each visit, bot traffic is not counted, and you cannot filter by device or country.
Traffic allocation is the intended percentage of eligible visitors, and other active rollouts can reduce the share you actually receive. Managing rollouts says you can schedule rollouts with overlapping dates, including multiple Experiments, and that some changes require traffic to be split between conflicting rollouts (mutual exclusion). Review traffic and conflict information on the Experiment's details page before you treat a 50/50 split as a measured share of the store. The Admin API returns both the configured trafficAllocation and the effectiveTrafficAllocation.
Experiments, and rollouts that publish to less than 100 percent of visitors, apply only to your online store, and rollout analytics measure visitors on the online store, cart, and checkout while leaving out headless storefronts and Shopify POS. If you add a catalogue change to the same Experiment, product ads, listings, and feeds can show a different offer from the one some visitors see on the storefront.
Will a GitHub deploy update the control theme?
No. Control visitors keep the activation snapshot, whatever you deploy to the live theme.
Managing rollouts already said each Experiment has its own independent copy of the control, and that editing the control on one Experiment does not change controls for other Experiments. For a theme replacement, the Online Store page lists the treatment and control themes while the Experiment runs.
Shopify staff confirmed that, for a theme-replacement Experiment, Shopify makes the control copy at activation and serves it to control visitors for as long as the Experiment runs. GitHub deployments to the live theme leave that copy unchanged, so control visitors will not see them, and products and other shared store data stay shared. The activation snapshot behaves like a photocopy taken on the day you press activate, and later edits to the original never reach it.
Theme code can drift between the arms while catalogue, inventory, and product content stay one store. A beauty and skincare flagship like Medik8 moved from a legacy theme to Shopify 2.0 with bespoke sections and multi-store architecture, which is the kind of live theme that needs a hard deploy freeze for the length of a replacement Experiment. A fashion and apparel launch like Kem Collection used a custom Shopify 2.0 theme with lookbook merchandising and metaobject-driven model size guides, which is the kind of second theme you add to Online Store before you select it as the replacement.
A deploy to the live theme misses the activation snapshot, and the replacement theme changes only when something deploys to it directly. If you keep deploying into the treatment theme while the Experiment runs, treatment moves and control stays at the activation snapshot. Shopify Help warns that editing the treatment or control copy when the Experiment is active can affect its results.
Shared store data cuts the other way. A price edit, a product publish, or an inventory change reaches both arms, because those records are not copied with the control theme. Put merchandising on the same freeze list as deploys, and log any price or product edit you let through, because both groups will see it.
Shopify Help also says you cannot change Liquid templates as part of a rollout, and that you cannot apply rollouts to vintage themes. A theme-replacement Experiment is how you test different Liquid, because the replacement theme already carries its own templates. For a smaller theme edit made with Sidekick, Shopify Canvas: Review Sidekick Theme Changes on Tracing Paper First covers how to review the change before it goes live.
What should you freeze before you activate?
Write the freeze list, name both themes, then activate.
Creating a rollout requires the replacement theme to exist in Online Store first. Staff who add that change need the Markets, then Rollouts permission and the Online Store, then Themes permission, and changing the replacement theme once it is in the rollout, or saving theme editor changes to it, also needs Online Store, then Edit code. The full permission list sits in Requirements and considerations, alongside the rule that headless checkouts cannot be tested this way.
Publishing is a separate gate. Shopify Help says you cannot publish a theme that a rollout uses as its replacement theme until that rollout ends. Publishing a different theme from Online Store or the theme editor while unended rollouts have theme edits shows a warning and, if you continue, removes those theme edits. Publishing from Shopify CLI, the GraphQL Admin API, the Shopify app, or another app is refused until you end or archive those rollouts. If a rollout replaces your theme, theme edits from your other rollouts are not displayed while the replacement theme is live.
When you end an active rollout you pick Roll back changes or Apply changes, and Shopify Help says you cannot revert the changes after you apply them.
Use this worksheet before anyone clicks activate:
| Record this | What Shopify documents or confirmed | Pass criterion before activate |
|---|---|---|
| Plan and theme type | Experiments need Grow or higher. Vintage themes are excluded. Theme replacement applies to all markets. | The store is on Grow or higher, neither theme is a vintage theme, and the replacement theme is already in Online Store. |
| First-request assignment | Assignment happens before theme selection and cache lookup. The first HTML response can already be control or treatment. | QA checks Shopify.theme.id in the original HTML response from a clean browser profile on the normal storefront URL, without expecting a control-only first view. |
| Session lifetime | The assignment lives in a session referenced by _shopify_essential: two days with no further request, up to 90 days after a further request, 365 days when logged in. The cookie is host-only. | The worksheet names those three lifetimes and the storefront hostname, and QA treats a second browser as a new visitor. |
| Page cache | The storefront page cache key includes assigned rollout flags, so one URL can store different HTML per variant. | QA loads the same path under both assignments and records two theme IDs with no redirect in between. |
| Activation snapshot | Shopify makes a separate control copy at activation. GitHub deploys to the live theme do not update that copy. Shared store data stays shared. | GitHub deploys to the live theme and to the replacement theme are frozen, with any exception dated, and product and price edits are frozen or logged as shared. |
| Overlapping rollouts | Traffic split divides assigned visitors. Overlapping rollouts can lower effective allocation. Editing an active control or treatment can affect results. | The details page shows no unexpected conflict, and nobody has a standing edit on either theme copy. |
| End state | You cannot publish the replacement theme until the rollout ends. Applying changes cannot be reverted. | The worksheet names who will apply or roll back, and which theme becomes live after the Experiment. |
A replacement test is clean when the activation snapshot, the treatment theme, and the freeze list still match what you wrote down before anyone clicked activate. If the two themes already diverge in Liquid, app blocks, or section JSON you cannot map, book a stack assessment and bring both theme names. A Shopify theme development pass can name the control copy, the treatment theme, and the freeze list so the Experiment Shopify serves is the one you intended to measure.



