Documentation

All the information you need in one place

How to remove Nelio scripts from pages that are NOT under test

In order to run the tests, Nelio A/B Testing adds a tracking script at the beginning of the HTML structure of your website. When executed, it checks if the current page is under test and, if so, performs a JavaScript redirect to a URL with parameters that will indicate which variant to show to the visitor.

However, you can modify the plugin settings to remove Nelio scripts from pages thar are not under test as follows:

  1. Make sure that in the plugin behavior settings you have disabled Add testing query args nab to all URLs to speed up page loading times when browsing your site.
Nelio A/B Testing plugin behavior settings
Nelio A/B Testing plugin behavior settings.

As you may already know, alternative content is loaded by appending a special query arg (nab) in tested URLs that tell WordPress which variant should be loaded. When a visitor is on a page in your website (be it under test or not), our plugin will look at all the internal links it contains and, if a link points to a tested page, it will add the appropriate nab query arg to said link. This way, if the visitor clicks on the link to browse to a tested page, the browser will request the correct variant easily.

  1. Limit Goal Tracking to Tested Pages

By default, Nelio’s A/B tests track conversion actions across your entire website. For example, if you had a test on your pricing page and you wanted to track clicks to a call-to-action button with a .nelio-cta class. By default, a click to that tracking element (i.e., an element with class .nelio-cta) from any page on your website will be a conversion.

However, you can limit track conversion events only on certain pages. In the Goal Tracking settings, select Tested Pages or Custom Pages to have Nelio A/B Test track conversion actions only on tested pages only or the pages you specify when creating a test, respectively.

This way, by disabling A/B Query args and limiting goal tracking, Nelio scripts will only be included in pages being tested.

Person writing a new WordPress post on a MacBook

Looking for popups?

We have the best plugin to create popups for WordPress in minutes.

Request Customized Enterprise Pricing

10
200000

With your express consent, we handle the information provided for the purpose of contacting you and until you ask us to delete it.

70% OF YOUR VISITORS DO EXACTLY WHAT
YOU JUST DID AND NEVER COME BACK!

KEEP THEM
ON YOUR SITE
LONGER WITH
NELIO POPUPS

Claim Your Discount Now

Image with a 10%-off coupon

WAIT! BEFORE YOU GO...

Get this awesome discount now!

No, I don't want to save money

Image with a 10%-off coupon

WAIT! BEFORE YOU GO...

Get this awesome discount now!

No, I don't want to save money

YOUR COOKIE SETTINGS


This site uses proprietary operational cookies that have a purely functional purpose and third-party cookies that help us understand how visitors interact with the site by collecting and presenting information anonymously. To get more information about these cookies and the processing of your personal data, check our Privacy & Cookie Policy. Do you accept these cookies and the processing of personal data involved?


If you don’t, you can reject non-operational cookies and continue browsing this site by clicking here.