Fruits in a market

At Nelio, we continue our relentless development schedule to enhance our plugins and provide you with superior service. Earlier this week we launched Nelio A/B Testing 7.0, a version that features new tests, implements faster split testing, and offers better control over your data, among other things. Here’s all you need to know about it.

Faster Alternative Loading with Dynamic Caching

Nelio A/B Testing is a WordPress plugin that makes it possible to easily split test your website. It allows you to create and run alternative versions of your site so that, when a visitor lands on a tested page, they randomly see one version or the other and you can determine which one is more effective at generating sales, leads, or any other desired outcomes.

How Does Our Plugin Load Alternative Content?

Here’s how our plugin makes it possible to load alternative content for each visitor on your website:

  1. A visitor lands on a page on your website:
  2. WordPress returns the requested page. The page contains a special inline JavaScript snippet inserted by Nelio A/B Testing with information about your active tests, as well as a main.js testing script.
  3. When the visitor’s browser receives the page, the previous testing script kicks in and checks if the current page (i.e. if /some-page/) is under test.
  4. If it’s not under test, we’re done. But if it is…
  5. Our testing script will randomly assign that visitor a number and store it in a cookie named nabAlternative for subsequent visits. The cookie tells our plugin which variant the visitor is supposed to see. For example, if the test has two variants, an even value means the visitor is supposed to see variant A and an odd value means variant B.
  6. If the visitor is supposed to see variant A, our plugin knows the page WordPress generated in (2) is already the correct page, so we’re done. The plugin tracks the page view and that’s it.
  7. But if the visitor was supposed to see a different variant, our plugin performs a JavaScript redirection to request and load the appropriate variant from WordPress. In general, this redirection simply means that the original URL is rewritten as, where the value of nab tells our plugin the variant that has to be loaded:
    • nab=0 is variant A
    • nab=1 is variant B
    • nab=2 is variant C
    • etc
  8. Because of this redirection, the visitor now lands on, and so the whole process runs again: our testing script realizes this page is under test, it also notices it’s actually a variant and, more specifically, the variant the visitor is supposed to see, and concludes everything’s fine and can start collecting views and conversions.

In a nutshell, all Nelio A/B Testing does is make sure each visitor sees the variant they’re supposed to see. And to guarantee that, it rewrites the URL to trigger a JavaScript redirection when needed. Which brings us to the following obvious question:

Why Does Nelio A/B Testing Use JavaScript Redirections?

That’s a good question. And it has a simple answer. We implemented these redirections to cope with cache plugins and content delivery networks (CDN).

When a visitor requests a certain URL, WordPress may or may not be the one answering the request. If your website uses a cache plugin or is behind a CDN, it’s possible that the requested page had been already generated in a previous request made by a different visitor, and that’s the page this “new” visitor will receive.

If the previous visitor was supposed to see variant A (and that’s the cached copy we now have in our cache/CDN) and this new visitor is supposed to see variant B… well, that doesn’t work, does it?

By rewriting the URL, we’re basically tricking those systems into believing that there are two different pages:

  • is one page (variant A)
  • is a different page (variant B)

A simple and effective solution that’s been working for over a decade. Unfortunately, it has a “big” downside: it takes some time. If the visitor requested one variant (for instance, variant A) and they’re supposed to see the other variant (B), we need to start the process all over again and request the correct URL.

Wouldn’t it be great if we could make everything faster?

Dynamic Caching to Load Alternative Content in Nelio A/B Testing

With a classical static caching strategy, you basically have one page per URL. When a visitor accesses a URL for the first time, the cache looks at all the cached URLs it has and, if it has the requested URL, it returns the cached copy right away. But if it doesn’t, it lets WordPress generate that page, stores the new page for future reference, and serves it.

Dynamic caching is just a fancy term that means we can cache stuff based on multiple criteria on top of just the URL, making it possible to, for instance, tailor the content according to a visitor’s cookies. For example, if the visitor requests a certain URL (/some-page/) and the value of a certain cookie (nabAlternative) is 0, serve variant A; but if the cookie is set to 1, reply with variant B.

And that’s precisely what we’ve done! We’ve looked at some of the most used cache plugins in WordPress (including W3 Total Cache, LiteSpeed Cache, WP Rocket, or WP Super Cache) and integrated their dynamic caching capabilities into Nelio A/B Testing. All you gotta do is enable the appropriate settings in our plugin:

Variant Loading Settings in Nelio A/B Testing
Variant Loading Settings in Nelio A/B Testing.

as well as configure your cache plugin, and you’d start benefiting from faster loading times. If you want to know all the details and how to enable it (if possible) on your system, please take a look at our knowledge base.

Elementor Templates

Nelio A/B Testing 7.0 also introduces support to test Elementor Templates. All you gotta do is create a new Template Test in Nelio and then select the appropriate Elementor Template Type you want to test:

Test Elementor Global Templates in Nelio A/B Testing using Template Tests
Template tests in Nelio A/B Testing now include Elementor templates.

You’ll find all the information you need about this new feature in our knowledge base.

Export Results

One of the most requested features we’ve had over the years for Nelio A/B Testing is the possibility to download your results data and, well, we’re glad to announce that this is finally possible:

Both regular tests and heatmaps now have a section named Export that you can access to Download your data in CSV format. This way, you’ll be able to analyze the raw data as you please and draw your own conclusions, if you so wish.

Additional Updates

Moreover, this version also addressed the following:

  • Add Yoast filter to prevent nab* query args from being removed if “Remove unregistered URL parameters” is enabled
  • Add new filter nab_max_combinations
  • Disable conversion events in PHP on staging sites
  • Fix confetti colors
  • Fix duplicated content in variants created with Thrive Architect
  • Fix error in public script where one should check if href attributes in anchor tags are indeed a string
  • Fix helper function listify to list all items when list has more than two items
  • Fix quota notification emails when quota could not be retrieved
  • Fix quota notification emails when site limits are set
  • Implement new method to load heatmap data faster
  • Prevent cookie initialization for most cookies until visitor granted us permission (only nabAlternative and nabSegmentation can be created)
  • Remove From and Reply-To directives from notification emails sent by our plugin
  • Show Publish button in Gutenberg while editing alternative to make Nelio compatible with recent Gutenberg plugin version

Featured Image by Thomas Le on Unsplash.

Leave a Reply

Your email address will not be published. Required fields are marked *

I have read and agree to the Nelio Software Privacy Policy

Your personal data will be located on SiteGround and will be treated by Nelio Software with the sole purpose of publishing this comment here. The legitimation is carried out through your express consent. Contact us to access, rectify, limit, or delete your data.