Shopify · CRO · Conversion · A/B testing

Shopify CRO: improving conversion with A/B tests, from a developer's chair

By Victor A.27/06/265 min readFollow on Google
Shopify CRO: improving conversion with A/B tests, from a developer's chair

CRO, conversion rate optimization, is the thing people sell you with promises of "+300% sales guaranteed." Be wary of those numbers: nobody can guarantee a result on YOUR store without measuring it first. Real CRO is more boring than that, and far more reliable. You form a hypothesis, you test it on your real visitors, you keep what works, you drop the rest. Here's how I go about it on the technical side, and when it's worth getting started.

What CRO actually means

Improving your conversion means increasing the share of visitors who buy. If 100 people land on your store and 2 order, you're at 2%. Moving to 2.5% is 25% more orders without spending a single extra euro on ads. That's why everyone talks about it.

The trap is believing there's a universal list of best practices to apply. A green button that crushes it for a competitor might do nothing for you, or even drag your sales down. Your store has its own traffic, its own products, its own prices, its own audience. The only way to know what works is to test on your own visitors.

Why A/B testing

An A/B test means showing version A to half your visitors and version B to the other half, at the same time, then comparing the results. You replace opinions with a number measured on your real audience. No more "I think that," just what people actually do.

On Shopify, it gets a little tricky. The checkout is locked unless you're on Plus, so most of your testing happens on the theme: product page, cart, homepage, collection pages. That's already where the majority of conversions are won or lost.

Where code makes the difference

Most merchants install an A/B testing app and stop there. It works to get started, but these apps often inject a heavy third-party script that slows the page down and causes a flicker effect: version A shows for a fraction of a second before being swapped for B, right in front of the visitor. And speed weighs directly on conversion, every extra hundred milliseconds of load time costs you sales. I cover this in detail in my articles on Shopify speed and on INP in 2026.

A test coded into the theme avoids that weight. You assign each visitor to a group once and for all, you send the event to your analytics tool, and that's it. Something as simple as this:

// Assign each visitor to a group, in a stable way
let group = localStorage.getItem('ab_cta');
if (!group) {
  group = Math.random() < 0.5 ? 'control' : 'variant';
  localStorage.setItem('ab_cta', group);
}
document.body.dataset.abCta = group;
// then style and send the analytics event based on data-ab-cta

No external dependency, no flicker if you hide the content in CSS while the assignment happens, and you decide exactly what you measure. For Plus stores, you can even split server-side, which is cleaner still.

My method, step by step

I always work in the same order.

  1. Measure first. Without data (analytics, session recordings, conversion funnel), you're testing blind.
  2. Form a precise, testable hypothesis. "Showing shipping costs right on the product page should reduce cart abandonment" is a hypothesis. "Make the page prettier" is not.
  3. Code the variant cleanly, without bloating the page or breaking the rest of the theme.
  4. Let it run long enough. A test needs volume to give a reliable result, I'll come back to that in a second.
  5. Decide. You keep the variant if it clearly wins, otherwise you go back to the original with no regrets. A test that proves nothing is still useful, it stops you from shipping a false good idea.

The mistakes that ruin a test

The three I see most often:

  • Testing without enough traffic. With 200 visits a month, the result is drowned in noise. You'll read a "winner" that isn't one.
  • Stopping on the first day that suits you. Conversion moves with the days, the campaigns, the season. Cutting a test because the variant leads on Monday morning is lying to yourself.
  • Changing ten things at once. If you modify the button, the displayed price and the photos at the same time, you'll never know which one moved the needle.

Is it worth it for you

Be honest about your traffic. Below a few hundred orders a month, classic A/B testing lacks the material to conclude quickly. At that stage, you make far more progress fixing the foundations: a page that loads fast, a checkout without friction, clear product pages. My Shopify audit is there precisely to spot these points before you even think about testing.

When your volume allows it, coded CRO becomes one of your best levers. You turn the traffic you already pay for into extra orders, month after month, without stacking yet another app on your store.

It's the kind of work where a developer changes the game: instrumenting your store properly, coding lightweight variants, reading the results without telling yourself stories. If you want to know what's really holding your conversion back before testing anything, my audit covers it and hands you a concrete plan. You can also see the kind of projects I deliver in my portfolio section.

FAQ

Frequently asked questions

How much traffic do I need before A/B testing is worth it?

Below a few hundred orders a month, a classic A/B test doesn't have the volume to conclude. At 200 visits a month your result is drowned in noise and you'll read a winner that isn't one. Put that time into the foundations instead: a page that loads fast, a checkout without friction, product pages that answer the obvious questions.

Do I need an A/B testing app for Shopify?

Usually not, and the app route carries a real cost. Those tools inject a heavy third-party script that slows the page down, and they cause the flicker where version A shows for a fraction of a second before being swapped for B in front of the visitor. About ten lines in the theme do the same job. Assign each visitor to a group once with localStorage, put it on the body as a data attribute, send the event to your analytics, and hide the content in CSS while the assignment happens so there's no flicker at all.

Can I A/B test the Shopify checkout?

Only on Shopify Plus. Everywhere else the checkout is locked, so your testing happens on the theme: product page, cart, homepage, collection pages. That's where most conversions are won or lost anyway, so the limit stings less than it sounds.

How long should I let an A/B test run?

Long enough for the volume to speak. Conversion moves with the day of the week, your live campaigns and the season, so a test you cut after two days tells you nothing reliable. And change one thing at a time. If you touch the button, the displayed price and the photos together, you'll never know which one moved the needle.

About the author

Victor A.

Victor A.

Tech-Everywhere

Independent Shopify developer based in Brittany. I help DTC brands boost technical performance, SEO and conversions.

Related articles

Cal.com

Got a Shopify project in mind?

Let's talk about your challenges in 30 minutes. First call is on me, no strings attached.

Shopify CRO: improving conversion with A/B tests, from a developer's chair | Victor A. @Tech-Everywhere