Skip to content
FunnelGuard

Fix guide by FunnelsGuard

A/B test flicker: stop the original showing before the variant

CNV-347Low impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

Most A/B testing and personalisation tools run in the visitor's browser. The page loads as the original, then the tool's JavaScript changes the headline, image or button for visitors in a variant. If the browser paints before the script runs, the visitor sees the original for a split second and then watches it change. This is often called flicker, or a flash of original content.

Why it costs you leads or sales

The business impact is usually low, but it is real. A visible swap looks unpolished and can make visitors distrust the page, especially on a headline, price or offer. It can also bias your test: if the variant causes a jolt that the original does not, you are measuring the flash as well as the idea. A visitor who sees the old offer and then a new one may also be confused about which one is true.

How flicker can skew a testExample numbers
How flicker can skew a test (example)Original: 4 % conversion; Variant with flicker: 4.2 % conversion; Variant without flicker: 4.8 % conversion02444.24.8OriginalVariant with flickerVariant without flick…% conversion

Example: the variant has a better message, but the visible swap cancels part of the gain. Numbers are illustrative only.

What the visitor sees
  1. Page requestBrowser starts loading HTML
  2. Original paintsVisitor sees the control headline
  3. Test script runsVariant changes are applied late
  4. Variant shownContent jumps to the new version

The break is the moment the original is painted before the test script runs.

How to check if your site has it

Flicker lasts a fraction of a second, so you will often miss it by eye. Use one of these approaches.

Spot flicker
  1. Force the variant

    Use your testing tool's preview or QA link, or its cookie or URL parameter, to get the variant reliably.

  2. Throttle the network

    In Chrome DevTools open the Network tab and choose a Slow 4G profile. Slower loads make a late swap easier to see.

  3. Record the load

    In DevTools open the Performance panel and start a reload recording with screenshots enabled. Step through the first frames and look for the original content.

  4. Test with a cold cache

    Use a private window, since cached scripts can hide the problem on repeat visits.

  5. Check mobile too

    Phones are slower, so flicker is often worse there.

How to fix it

The cause is timing: the change arrives after the first paint. The fix is to apply it sooner, make it smaller, or apply it before the page is sent.

Fix the flicker
  1. Load the test script early

    Place it high in the head, before heavy CSS and other scripts, and load it synchronously if your tool recommends that. Do not load it through a tag manager if the tool advises a direct install, as that adds delay.

  2. Hide only what changes

    Hide just the element being tested until the variant is ready, rather than the whole page. Always add a timeout so the content shows even if the script fails.

  3. Reduce the size of the change

    Prefer CSS changes over large DOM rewrites, and test fewer elements per experiment.

  4. Use server-side or edge testing for key pages

    If your tool supports it, choose the variant before the HTML is sent so the right version arrives first.

  5. Use your tool's own recommended snippet

    Follow your vendor's current instructions, as the right approach differs by tool.

Hide one element briefly, with a safety timeouthtml
<style id="hide-hero">.hero-headline{opacity:0 !important}</style>
<script>
  setTimeout(function () {
    var s = document.getElementById('hide-hero');
    if (s) s.remove();
  }, 800);
</script>
Where to apply it by platform
  1. Add the script in the head

    Use your theme's header hook or a header scripts plugin so the test script loads before other scripts, not in the footer.

  2. Exclude it from deferral

    If a caching or optimisation plugin delays or defers JavaScript, exclude the test script from that setting.

How to confirm it's fixed

Repeat the same recording with the same throttling, cold cache and forced variant. In the first frames you should see only the variant, never the original. Check on desktop and a real phone, and on each page that carries the test.

Before and after

Flicker

  • Script loaded late or deferred
  • Original headline visible for a moment
  • Whole page or large blocks rewritten

Clean load

  • Script early in the head
  • Only the tested element briefly held back, with a timeout
  • First paint already shows the variant

How to prevent it happening again

Before launching each test
  • Test the variant on Slow 4G with a cold cache
  • Check desktop and mobile
  • Confirm the test script is still in the head and not deferred by an optimisation plugin
  • Keep changes small and scoped
  • Keep a fallback timeout on any hiding rule
  • Re-check after theme, plugin or tag manager changes

How FunnelGuard handles this

FunnelGuard does not check for A/B test flicker today. It is a possible future check, since it depends on screenshot timing in the first moments of a page load. What FunnelGuard does do is run your real customer journeys on a schedule and check each step, the tracking hits sent to ad and analytics platforms, and whether test leads reach your inbox and CRM. That can show you when a test variant breaks a form or drops tracking, but not that the original flashed first.

Questions people ask

Why does my A/B test show the original page before the variant?

Client-side testing tools change the page with JavaScript after it loads. If the browser paints the original before the script runs, visitors see the original for a moment and then the swap.

How do I stop A/B test flicker?

Load the test script early in the head, hide only the tested element briefly with a short timeout, keep changes small, or use server-side testing so the variant is in the HTML from the start.

Does flicker affect A/B test results?

It can. A visible swap may reduce trust or distract visitors in the variant only, so you may be measuring the flash as well as your idea. Fixing it makes results cleaner.

Is an anti-flicker snippet a good fix?

It can help, but it hides content until the script is ready, so it needs a short timeout. If the script fails, a poorly built snippet can leave the page blank, so scope it narrowly.

Does loading the test tool through Google Tag Manager cause flicker?

Often, yes. A tag manager adds a step before the test script runs, so the swap happens later. Fire the tag as early as your consent setup allows, or install the script directly in the head.

How can I see flicker if it only lasts a split second?

Throttle the network to Slow 4G in Chrome DevTools, reload with a cold cache and record the load in the Performance panel with screenshots. Step through the first frames to spot the original.

Does FunnelGuard detect A/B test flicker?

No. FunnelGuard does not check for flicker yet. It does run your customer journeys on a schedule and checks steps, tracking hits and lead delivery, which can reveal broken variants.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.