# How to A/B test a Shopify store

> The best way to A/B test a Shopify store depends on what you change. For prices, shipping and offers, use a Shopify testing app such as [Intelligems](https://duelpilot.com/compare/duelpilot-vs-intelligems) or [Shoplift](https://shoplift.ai). To compare two whole themes, Shopify's own [Rollouts](https://help.shopify.com/en/manual/markets-new/rollouts) can run an experiment. For storefront content (headlines, product page layout, images, calls to action), a script in the theme works: Duelpilot is one, added to theme.liquid and run by your own AI agent.

Last reviewed: 2026-10-29 · HTML version: https://duelpilot.com/guides/shopify-ab-testing

## Pick the tool by what you want to test

Shopify decides prices, shipping rates and checkout on its servers; the theme decides what the storefront looks like. A tool that only changes the page in the browser can't make the checkout charge a different price, and a pricing app is not built for redesigning a product page. Start from the change you want to test:

Which kind of tool fits which Shopify test. Each tool name links to its source or our sourced comparison.

| What you want to test | Fits best | Why |
|---|---|---|
| Prices, shipping thresholds, offers, checkout | [Intelligems](https://duelpilot.com/compare/duelpilot-vs-intelligems), [Shoplift](https://shoplift.ai), [ABConvert](https://duelpilot.com/compare/duelpilot-vs-abconvert) | These apps integrate with Shopify's pricing and checkout, so the visitor pays what the test showed. |
| Two whole themes or checkout configurations | [Shopify Rollouts (Experiment)](https://help.shopify.com/en/manual/markets/rollouts/rollout-types) | Built into the admin; no extra tool. Plan and theme limits apply (below). |
| Storefront content on home, collection, product and cart pages | Duelpilot, or another script-based testing tool ([comparison](https://duelpilot.com/best-ab-testing-tools)) | A script in the theme layout changes copy, layout, images, sections and calls to action on any Online Store 2.0 theme. |
| Behaviour in a headless storefront (Hydrogen, Next.js) | Server-side flags in your own code, for example Duelpilot's Code plan | The storefront is your app, so the test lives in your code. See [A/B testing in Next.js](https://duelpilot.com/guides/nextjs-ab-testing). |

## Shopify's own option: Rollouts

Shopify's [Rollouts](https://help.shopify.com/en/manual/markets-new/rollouts) (Markets → Rollouts in the admin) schedule changes to the main theme, checkout and accounts pages, discounts and catalogs. An Experiment rollout compares a treatment with a control, split 50/50 by default ([rollout types](https://help.shopify.com/en/manual/markets/rollouts/rollout-types)). According to Shopify's [requirements page](https://help.shopify.com/en/manual/markets/rollouts/requirements-and-considerations), experiments need the Grow plan or higher, you can't change Liquid templates as part of a rollout, vintage themes are not supported, and headless or custom storefront checkouts can't be tested. If you want to test a new theme against your current one without adding a tool, start there.

## Price and shipping tests: use a Shopify app

[Intelligems](https://duelpilot.com/compare/duelpilot-vs-intelligems) specialises in price, shipping, offer and checkout tests on Shopify and has an MCP server on its paid plans. [ABConvert](https://duelpilot.com/compare/duelpilot-vs-abconvert) covers price, shipping, theme, template and checkout tests (checkout on Shopify Plus), with an MCP server in beta. [Shoplift](https://shoplift.ai) is a Shopify app for theme and template tests made in the Shopify theme editor, and its site shows price tests too. Duelpilot doesn't test prices in the browser: the price is decided by Shopify, not by the page. If you sell on Shopify and the question is what to charge, choose one of these apps.

## Storefront tests with Duelpilot

Duelpilot is not a Shopify app. It is one synchronous script tag in your theme layout, and the tests are run by your own AI agent (Claude, ChatGPT, Cursor or another MCP client) through Duelpilot's [MCP server](https://duelpilot.com/mcp-ab-testing). The agent calls get\_install for the snippet, helps you add it, then calls verify\_install, which checks the page source (in the head, synchronous, the right key, not blocked by a cookie banner) and loads the page in a real desktop and mobile browser.

1. Online Store → Themes → on the current theme, ⋯ → Duplicate, so you work on a safe copy.
2. On the copy: ⋯ → Edit code → layout/theme.liquid. Paste the snippet on a new line right after the charset meta tag, above {{ content\_for\_header }} (that tag injects Shopify's and apps' scripts). Add it to any other layout your templates use, except password.liquid.
3. Preview the copy and let the agent run verify\_install on the home page, a collection, a product and the cart.
4. Go live by making the same one-line edit in the live theme's theme.liquid. Publishing the copy instead would discard theme editor changes made to the live theme since you duplicated it.

```liquid
<meta charset="utf-8">
<script data-cfasync="false" src="https://edge.duelpilot.com/s/YOUR_SITE_KEY.js"></script>
{{ content_for_header }}
```

### Why not a custom pixel or an app embed

Shopify runs custom pixels and app pixels in a [sandbox](https://shopify.dev/docs/apps/build/marketing-analytics/pixels) (an iframe or a web worker) without access to the top-level page, so they can't change what the visitor sees. App embeds and script-tag injected scripts load asynchronously, which means the original shows first and the variant flickers in. Only the theme layout runs the script early enough to show a variant without flicker.

### What a theme script can't reach

Checkout is outside the theme. Shopify made the additional scripts section in checkout settings view-only on 28 August 2025, and non-Plus stores had to upgrade their Thank you and Order status pages by 26 August 2026 ([Shopify help centre](https://help.shopify.com/en/manual/checkout-settings/checkout-extensibility/checkout-upgrade)). So test on storefront pages and measure purchases through GA4: the store's purchase key event can be mapped to the test's goal, and Duelpilot shows the [GA4 result per variant](https://duelpilot.com/guides/ga4-ab-test-results) next to its own counter.

### After the install

Your agent proposes ideas from GA4 data and the live pages, designs two to four variants, and runs site checks on phone, tablet and desktop before anything launches. You approve each launch, or on Pro and up switch on autopilot, which launches only within the guardrails you set. Results use sequential statistics that are safe to check daily ([how that works](https://duelpilot.com/guides/sequential-testing)).

## Shopify-specific things to check

- Theme updates from the Theme Store create a new theme version: carry the tag over.
- Markets with several domains: every domain that serves the theme must be one of the Duelpilot site's domains, or its visits aren't counted. Preview links on myshopify.com and shopifypreview.com load the script, which is enough for verifying, but aren't counted.
- A consent app may hold the script back until the visitor consents; verify\_install flags it, and how to classify the script is the store owner's call.
- Don't run Duelpilot and another testing app on the same elements at the same time.

## Try Duelpilot with your own agent

Give your agent one line: [set up Duelpilot for my site using /agents.md](https://duelpilot.com/agents.md). It opens a workspace, installs and verifies the script, and drafts the first test; you approve it, then switch on autopilot if you like. Or [see pricing](https://duelpilot.com/#pricing).

**[Start for €0](https://duelpilot.com/login) · [Give it to your agent](https://duelpilot.com/#start)** (€0 until you launch your first test)

## FAQ

### Is Duelpilot a Shopify app?

No. It is one synchronous script tag in layout/theme.liquid, above content\_for\_header. Your AI agent installs and verifies it; there is nothing to install from the Shopify App Store.

### Can Duelpilot test prices or shipping on Shopify?

Not in the browser: Shopify decides the price at checkout. Use a Shopify app such as Intelligems, Shoplift or ABConvert for price and shipping tests, and Duelpilot for storefront content.

### Can I A/B test the Shopify checkout with a script?

No. Checkout runs outside the theme, so theme scripts don't run there. Test storefront pages and measure purchases through GA4, which Duelpilot reads per variant.

### What does Duelpilot cost for a Shopify store?

Plans start at €9 per month per site (Pro, with autopilot, is €49). It's €0 until you launch your first test: installing, ideas, designs and previews cost nothing.

## Sources

- [Rollouts | Shopify Help Center](https://help.shopify.com/en/manual/markets-new/rollouts) (checked 2026-10-29)
- [Rollouts requirements and considerations | Shopify Help Center](https://help.shopify.com/en/manual/markets/rollouts/requirements-and-considerations) (checked 2026-10-29)
- [Types of rollouts | Shopify Help Center](https://help.shopify.com/en/manual/markets/rollouts/rollout-types) (checked 2026-10-29)
- [Pixels | Shopify Dev Docs](https://shopify.dev/docs/apps/build/marketing-analytics/pixels) (checked 2026-10-29)
- [Upgrading to Checkout Extensibility | Shopify Help Center](https://help.shopify.com/en/manual/checkout-settings/checkout-extensibility/checkout-upgrade) (checked 2026-10-29)
- [Shoplift: The CRO Platform Built for Shopify](https://shoplift.ai) (checked 2026-10-29)
- [Pricing & Plans | Intelligems](https://www.intelligems.io/pricing) (checked 2026-10-17)
- [Drive ABConvert from Claude with MCP](https://docs.abconvert.io/mcp/overview) (checked 2026-10-17)

## Related

- [Duelpilot vs Intelligems](https://duelpilot.com/compare/duelpilot-vs-intelligems)
- [Reading A/B test results in GA4](https://duelpilot.com/guides/ga4-ab-test-results)
- [A/B testing without flicker](https://duelpilot.com/guides/ab-testing-flicker)
- [Best A/B testing tools](https://duelpilot.com/best-ab-testing-tools)
