REQUEST A CONVERSION STRATEGY SESSION   |   888-961-6604
Conversion Sciences
  • CRO Services
  • Guaranteed Redesign
  • About
  • Contact
  • Book a Consultation
  • Menu Menu

AB Testing JavaScript: Great Power, Great Problems

CRO Tests | Multivariate | AB Testing

The AB Testing JavaScript that powers tests is powerful, but can lead to many unintended consequences.

Conversion Sciences offers a pretty amazing ability to our clients: A completely “turnkey” conversion optimization testing service. By “turnkey” we mean that our clients don’t need to do anything to their website in order for us to analyze the site, design creative, develop code, QA, test, review and route traffic to winners.
Why is this? Don’t we need new pages designed? Interactions with IT? Release schedules? Sprints?
The reason we have this “phenomenal cosmic power” is that our AB testing tools take control of each visitor’s browser. The changes are made on the visitors’ devices, so the website doesn’t have to be modified.
Well, not until we’ve verified that a change brings in big money.
While this makes us feel all high and mighty, it comes with a big drawback.

The Magic and Mania of JavaScript

All of the major browsers have a scripting engine built into them. It allows programs to be run inside the browser. The programming language used is called JavaScript. It’s JavaScript that makes websites interactive. Website developers use JavaScript to make text accordion when you click a heading. It is used to rotate images in a carousel.
Unfortunately, developers use JavaScript to do silly things, like parallax animations.

This unnecessary "parallax" motion may be reducing the conversion rates for this site.

This unnecessary “parallax” motion may be reducing the conversion rates for this site.

And then there’s this.

Don't use JavaScript animations just because you can.

Don’t use JavaScript animations just because you can.

Yes, JavaScript gives us the power to make our websites harder to use.

JavaScript is Used in AB Testing Software

Our developers use JavaScript to modify a website when you visit it. The AB testing software “injects” our JavaScript into the browser when the page is loaded.

First the web page is loaded as is from the webserver. Some visitors will see only this default version of the website.

For some visitors, our JavaScript is then injected and executed. The AB Testing software determines who sees the default web page and who will see a variation of the page.

Phenomenal Cosmic AB Testing Power

We can change almost anything about a page using AB Testing JavaScript.

We change the headline to something different.

We change the order of a rotating carousel, or slider.

We hide elements…

AB Testing flicker can be cause by simply removing elements.

AB Testing flicker can be cause by simply removing elements.

and insert them as well.

We insert video.

We completely change the look of a website.

We completely change the look and feel of this site. The test showed the white site performed the same as the brown site.

We completely change the look and feel of this site. The test showed the white site performed the same as the brown site.

AB Testing JavaScript is a Step Toward Personalization

If we wanted, we could deliver a different website to every visitor who arrives. If you’re thinking “personalization” at this point, then you have an idea of where our industry is heading.

AB testing produces the data that makes personalization truly work.

Here are my instagraphic notes from a presentation by Chris Gibbins at Conversion Conference 2016 on using AB testing and personalization.

Instagraphic shows why and how to use AB Testing for personalization.

Instagraphic shows why and how to use AB Testing for personalization.

AB Testing Flicker, Flash, Blink and Ghosting

Unfortunately, JavaScript can introduce an error into our AB tests. Because we always load the website “as it is” on the server first, there is a possibility that the visitor will see the original for a fraction of a second before our changes get executed.
This has been called a “flash”, “flicker”, and a “blink”. It can have a significant effect on test results.

With AB Testing JavaScript, Flash is not cool.

With AB Testing JavaScript, Flash is not cool.

The problem with this AB testing JavaScript flicker is that it won’t be there if a change is made permanent on the site. Our tests may say the new change generated more revenue, and we’ll change the website to make that change manifest. But there will be no flicker. This means there is another variable in our test.
Was it the new headline we tested or was it the flicker that made more people buy?


21 Quick and Easy CRO Copywriting Hacks to Skyrocket Conversions

21 Quick and Easy CRO Copywriting Hacks

Keep these proven copywriting hacks in mind to make your copy convert.

  • 43 Pages with Examples
  • Assumptive Phrasing
  • "We" vs. "You"
  • Pattern Interrupts
  • The Power of Three

"*" indicates required fields


The Human Eye is Drawn to Motion

Our eyes and brains have evolved to make motion important. When something moves, our eyes and brains work hard to figure out if the thing moving is edible, if it will eat us, or if we can mate with it. Technology has moved faster than evolution. Even though we’re looking at a website, where there is no immediate source of food, fear or fornication, our lizard brains continue to favor motion.

Imagine this scenario. We are testing the text on a button. That means that for some of our visitors, the button will change. Others will see the default button text. Then we’ll see who buys the most.

The changing element on this page draws your eye, and can make the page impossible to focus on.

The changing element on this page draws your eye, and can make the page impossible to focus on.

If there is a flicker, flash or blink when the text changes, the button will be immediately more visible to those visitors who see it. More of them will see the call to action. This may make more of them consider buying than those who simply scrolled past. If this new treatment generates more revenue, we are left with the question, “Was it the text or was it the motion that created the lift in sales?”

We won’t know until we push the new text onto the server and do a post-rollout analysis to see the real lift. At this point, we may find that the text didn’t increase purchases. It’s a real bitch.

How many buttons have been change because of flicker?

AB Testing Software Tries to Eliminate Blinking

The AB testing software that we use works to eliminate this blinking and flashing. The issue is so important that Convert Insights has patented their method for eliminating “blink”.

AB testing software like Optimizely, Visual Website Optimizer, Adobe Test, and Marketizator, load asynchronously, meaning that they load our changes as the page loads. This makes it easier for changes to be made before the visitor sees the page.

How Convert Insights Eliminates “Blink”

“The first thing this snippet does is hide the body element for max. 1.2 seconds (this can be set), this prevents blinking of elements already visual on the site that load under 1.2 seconds (we have yet to get a client that loads faster than this). During the 1.2 seconds, the SmartInsert(R) technology search and replaces DOM-elements every couple of milliseconds and loops through the entire available DOM-elements in the browser of the client. After all elements are replaced the body hidden attribute is set to display the site again either at 1.2 seconds or when the signal is given that all elements have been replaced (or DOM-ready).
Everybody can see how this technology works by loading our Chrome Extension.”
— Dennis van der Heijden, Convert.com

Eliminating Flash Flicker and Blink in AB Tests

In addition to this, our developers can do things that reduce and eliminate flicker and blink. Every test you do has different issues, and so a variety of tactics can be used to address them.

Avoid Google Tag Manager

Don’t use a Tag Manager like Google Tag Manager to serve your AB testing JavaScript software tags. Add them to the page manually. Tag managers can counteract the asynchronous loading of the tool and delay when changes can be made.

Make Changes with CSS

If the change can be made with the cascading style sheets (CSS), we favor making changes with CSS over using JavaScript. CSS can make changes to an element – like an image or font – that can be applied before an element displays.

Modal Dialogs and Overlays

Modal dialogs usually don’t display until the visitor takes an action. They can be edited before they are shown without flashing.

Use a Timer for DOM Changes

All of the images, headings, copy, widgets, and forms are stored in the browser in a big database called the DOM (Document Object Model). When JavaScript makes changes to the DOM, the content on the page changes. The DOM is slow-loading, as you can imagine.

Our developers will set a timer in JavaScript to check for when a changing element is loaded. By watching for our element to be loaded, we can execute a change it before the DOM – and the page – is loaded.

For the AB Testing Software to Load Our Changes Immediately

The AB testing software provides a synchronous loading mode. Optimizely and VWO use different approaches for this.

Rethink the Test

Sometimes, we have to go back to the drawing board and design a test that doesn’t cause flash-inducing changes. We will refactor a test to eliminate items that cause a flash or flicker.

Delay Display of the Content

We can delay the display of the content until the DOM is loaded and all elements have been changed. This causes a different kind of issue, however. The visitor sees a blank page or blank section for longer if they get the page with the change.

In one case we added a spinning wheel to indicate that the page is loading.
loading_small

Insert Placeholders Using Fast CSS

When inserting elements, we’ll use CSS to insert a placeholder, then use JavaScript to modify the element after the page has loaded. This reduces redrawing of the page when elements are inserted.

We created a blank box in CSS to minimize AB Testing Flash on this mobile website.

We created a blank box in CSS to minimize AB Testing Flash on this mobile website.

Optimizing for Mobile

Mobile pages load more slowly. This is because visitors don’t always have a high-quality connection when visiting from the festival, or from inside the walls of a bank while standing in line. For mobile devices, flash can be an even bigger issues.

Fortunately, the tactics we use on the desktop also work on mobile websites. But don’t forget to QA your test treatments on 3G and 4G connections. You may find flicker and blink on mobile devices that didn’t appear on your desktop.

Great JavaScript Developers are a Must

We spend a considerable amount of our time making sure our JavaScript and CSS changes are like the “native” implementation would look.  It’s one of the things that makes testing hard. Our team has the experience to ensure your tests aren’t falling victim to flicker, flash, blink or ghosting. Best in class Developers are one of the things that help to make use the most effective Conversion Optimization Agency on the planet!

If you’d like our team to take over the effort of developing your AB tests, contact us for a free consultation and an overview of our process.

  • Author
  • Recent Posts
Brian Massey
Brian Massey
Conversion Scientist™ at Conversion Sciences
Brian Massey is the Founder and Conversion Scientist™ at Conversion Sciences, a sought-after international speaker, and author of Your Customer Creation Equation. He is passionate about transforming websites through a steady diet of visitor profiling, purposeful content, analytics, and AB testing.

Expertise: conversion rate optimization, AB testing, marketing strategy, digital marketing, analytics, landing page design, computer programming, entrepreneurship

Speaking: IBM, Inbound, LeadsCon, Content Marketing World, Affiliate Summit, and more

Books and Training: Your Conversion Creation Equation, Video CRO, Marketing Videos that Convert, CRO Best Practices

As Seen On: ClickZ, Search Engine Land, Marketing Land, Conversion Sciences Blog, Intended Consequences podcast

Education: Texas A&M University, BS Computer Science and Management
Brian Massey
Latest posts by Brian Massey (see all)
  • Your Traffic Fell 30 Percent. Your Targets Did Not. - September 3, 2026
  • How to Filter Bot Traffic in Google Analytics With Ask Advisor - August 20, 2026
  • Using AI to Chat with your Online Business - July 10, 2026
  • 873SHARES
May 26, 2016/by Brian Massey
You might also like
How to set up your conversion marketing laboratory. Low Sales on Mobile, Conversion Tools, Flat Design [For Further Study]
Two variables with two variants each yield four page variations in this multivariate testing example. Multivariate Testing: Promises and Pitfalls for High-Traffic Websites
How to set up your conversion marketing laboratory. How an A/A Test Gives You Confidence
How to set up your conversion marketing laboratory. To the Bat Cave! Your Own Secret Conversion Marketing Laboratory
How to set up your conversion marketing laboratory. Converison Calculator: The Next Ten Percent
How to set up your conversion marketing laboratory. 3 Must-Use Facebook Ad Tactics for 2014
9 replies
  1. Chris Desadoy
    Chris Desadoy says:
    June 14, 2016 at 1:59 pm

    There are also full stack ways of doing this with angular and node.js you can use angular itself to pre-load and route pages based on headers presented dynamically.
    You can load balance and do a 50/50 split that way too, mostly onpage with a jquery plugin, w00t
    do you guys use angular for the preload?

    • Brian Massey
      Brian Massey says:
      June 14, 2016 at 3:27 pm

      We rely on the AB Testing tools for a raft of additional features. We can set interim goals, segment when visitors get entered into tests, generate graphs in a variety of formats, and do statisitcal analysis, both Frequentist and Bayesian.
      We’ll look at Angular for preload assuming it has compatibility across devices and browsers.
      Thanks for the suggestion.

      • Chris Desadoy
        Chris Desadoy says:
        June 14, 2016 at 3:44 pm

        I mean, obviously you guys really know your stuff, I was just curious to the tech, it seems like angular is a great solution for pre-load. Happy to maybe show you a new way./

        • Brian Massey
          Brian Massey says:
          June 15, 2016 at 2:57 pm

          If we’re understanding your approach, we’d need to restructure a client site to use the Angular loading approach effectively. Always open to new ideas. Have we missed something?

          • Chris Desadoy
            Chris Desadoy says:
            June 16, 2016 at 8:10 am

            It depends on the original site of course. For instance wordpress would probably be a pain in the ass to impliment an angular solution, but there is a bad ass wordpress plugin already.
            check this out, your engineers probably already have it on bookmark, but I think its a great resource https://github.com/daniellmb/ab-test

Trackbacks & Pingbacks

  1. AB Testing JavaScript: Great Power, Great Problems says:
    June 28, 2016 at 4:00 pm

    […] Source https://conversionsciences.com/blog/ab-testing-javascript-power-problems/?utm_medium=feed&utm_sou… […]

  2. The Hero's Journey to an Amazing AB Testing Program | Conversion Sciences says:
    June 7, 2016 at 11:02 am

    […] change happens in the visitor’s browser. Each visitor gets the same website from the server. It’s the JavaScript that instantly transforms what they see into a test treatment, something different and […]

  3. Stay Informed: 39 Conversion Optimization Blogs for You to Follow | The Invesp Blog says:
    June 7, 2016 at 10:50 am

    […] AB Testing JavaScript: Great Power, Great Problems […]

  4. Higher Conversion Rates for Marketing | Bannersnack blog says:
    June 6, 2016 at 8:32 am

    […] a single page, you can make small tweaks that generate great results. Usually, A/B testing involves a thorough research of your entire […]

Comments are closed.

Search Search

Free Ad Alignment Report

Are your ads making promises that your landing pages aren't keeping. We'll pull your entire portfolio and grade the landing pages.

"*" indicates required fields

This field is hidden when viewing the form

Free for a limited time.

Conversion Optimization Course (FREE CRO Training)

Sign up and read the nine articles we will email you.

Latest Articles

  • CRO vs. AI. Who Wins? Images of Sahil Patel and Brian Massey Conversion Sciences LLC
    Your Traffic Fell 30 Percent. Your Targets Did Not.September 3, 2026 - 10:36 am
  • "The visitors that are eating your conversion rate" with bugs attacking the words "your conversion rate" Conversion Sciendes
    How to Filter Bot Traffic in Google Analytics With Ask AdvisorAugust 20, 2026 - 11:16 am
  • Brian Massey in a lab coat and a data monster in the background. The caption says "Talk to your analytics" Conversion Sciences LLC
    Using AI to Chat with your Online BusinessJuly 10, 2026 - 2:31 pm

Blog Article Categories

  • Advertising CRO
  • Artificial Intelligence
  • Conversion Marketing Strategy
  • Conversion Optimization
  • Conversion-Centered Design
  • CRO Tests | Multivariate | AB Testing
  • Ecommerce CRO
  • Landing Page Optimization
  • Lead Generation
  • Persuasion Science
  • Web Analytics
Conversion Sciences | Best Conversion Optimization Agency

FacebookTwitter/XPinterestLinkedInNews/RSS FeedPodcast

  • Conversion Optimization Services
    • Optimization Services
    • Guaranteed Redesign
    • Fully-managed CRO
    • CRO Audit
    • AI Optimization
    • CRO Training & Coaching
  • CRO Solutions
    • Conversion Solutions
    • eCommerce Optimization
    • Lead Generation Solutions
    • CRO for Website Redesign
    • CRO for Mobile Lead Gen
    • CRO for Advertising
  • About
    • About Conversion Sciences
    • Contact
    • Success Stories
    • CRO Resources
    • Blog
    • Your Customer Creation Equation Book
    • Free CRO Course
    • CRO Calculator
    • Press & Speaking Dates
Free — $10,000 Value

See Exactly Where Your Website Is Losing Revenue

In a free 30-minute session, a Senior Conversion Scientist will audit your site and deliver actionable recommendations.

🛡️ Backed by our Guaranteed ROI commitment — if we don't deliver results, you don't pay.
What you'll walk away with
✓

Personalized site audit of your highest-traffic pages with specific conversion gaps identified

✓

3–5 prioritized recommendations you can implement this week — whether or not you hire us

✓

Honest ROI assessment based on your traffic and conversion data

✓

1-on-1 with a Senior Conversion Scientist (avg. 8+ years CRO experience)

Intuit Boingo AMEX GBT + 300 more
Book your free session

"*" indicates required fields

You'll receive a calendar link within 1 business hour.
Free. No commitment. 30 minutes.

"At present, we see around 10X ROI. We're truly happy with what Conversion Sciences has brought." — StewMac

© Copyright 2007 - 2026 • Conversion Sciences • All Rights Reserved
Conversion Sciences® and Conversion Scientist® are
federally registered trademarks of Conversion Sciences LLC.
Any unauthorized use is expressly prohibited.
  • Privacy Policy
  • Terms of Service
  • Disclaimer
  • Cookie Policy
  • Security
  • Jobs
Link to: 4 Types of Useful AB Testing Tools You May Not Realize You Have Link to: 4 Types of Useful AB Testing Tools You May Not Realize You Have 4 Types of Useful AB Testing Tools You May Not Realize You Have Link to: The Hero's Journey to an Amazing AB Testing Program Link to: The Hero's Journey to an Amazing AB Testing Program The Hero's Journey to an Amazing AB Testing Program
Scroll to top Scroll to top Scroll to top