All the information you need in one place

How does Nelio A/B Testing work?

Nelio A/B Testing has three main components:

  • WordPress plugin. Nelio A/B Testing extends your WordPress site introducing A/B Testing functionalities. Once installed, you’ll be able to A/B test your pages, posts, themes, widgets, menus, and so on, creating alternative content and discovering which version converts the best. The plugin seamlessly integrates into WordPress user interface and offers all the tools you need from within the Dashboard.
  • Tracking JavaScript. This script is responsible of assigning random variants to your visitors, requesting the appropriate content from your server and showing them to your visitors, tracking the activity of your visitors as they browse your website, and sending any relevant information to Nelio Cloud Servers.
  • Nelio Cloud Servers. During the execution of an A/B test, there’s a lot of tracking information to be stored and processed. This information is not sent to your WordPress server, but our Cloud. We’re responsible of collecting, analyzing, and processing all tracking information and generating the results you will see in your Dashboard. This way, we take care of all the workload these tasks entail and your server can focus on its main purpose: serving your website rapidly and reliably.

What happens when a user accesses a page in my site?

Whenever a user accesses a page /foo in your site, this is what happens:

1. The user types the address (or accesses it by clicking on a link in Google or Twitter, for example).

2. Your WordPress server returns the page Foo. This page includes two scripts:

  • One script responsible of loading alternative content: alternative-loader.js.
  • Another script responsible of tracking all events: main.js.

3. As the page is being loaded, alternative-loader.js performs a few checks. In particular, it tests whether cookies are enabled or not and whether the current user participates in your tests or she’s excluded from them.

4. If all checks are successful, it assigns the different variants the user is supposed to see for every running test (if she hadn’t been assigned one yet) and checks whether the page Foo is under test or not.

5. If Foo is under test, then we need to load some alternative content. A page is under test is, for instance, there’s a page test for that page, or if there’s a global test and the page is included in its scope, such as running a menu test. When that occurs, the script will redirect your visitor to the new address, which is basically the original address with the additional query argument nab. This argument tells Nelio A/B Testing which variant has to be loaded.

  • nab=0 is variant A (the control version)
  • nab=1 is variant B
  • nab=2 is variant C
  • etc

6. Your WordPress server receives the new request with nab properly set in the URL. Since Nelio A/B Testing is running in the server, it’s able to modify the result that’s usually under (namely, the Foo page) and return the appropriate variant instead.*

7. Again, this (alternative) page contains Nelio’s scripts, which means Nelio A/B Testing will also check if the current variant is under test (it is) and if the visitor is supposed to see the specific variant she’s currently seeing (she is).

8. If everything’s correct, our second script will kick in. main.js is responsible of tracking all the relevant events that occur in your site, such as “a user has seen this page variant” (in order to compute page views and conversions), “a user has clicked on this element and there’s an test monitoring these click actions“, “a user has submitted this form“, etc.

What are the advantages of using Nelio A/B Testing’s approach for split testing WordPress?

We’ve tested different approaches for loading alternative content and this one has proven to be the most efficient:

  • Variants are assigned in your visitor’s browser, thus reducing the workload of your own server.
  • All variants can be cached by your server and/or CDN, as every variant has its own, unique URL (namely, Again, this reduces the workload of your server and ensures a rapid response.
  • All tracking information is sent from your visitor’s browser directly to Nelio Cloud Servers, without going through your own server.

* Note that this means that, for a moment, the browser is downloading and parsing a version of your site that might end up being discarded as the redirection occurs. To reduce the impact of this approach, our tracking script is added as soon as we can, so that it runs as soon as possible and the redirection occurs as fast as it can be. Still, it may happen that your website will be a little slower to load that page.