How to Avoid Conflicts with Caching, Security, SEO Plugins, and Ad Blockers

Nelio A/B Testing works smoothly in most WordPress environments, but some plugins and browser tools can interfere with how tests are delivered and how events are tracked.

This guide helps you quickly identify any potential conflicts and configure your site to ensure accurate and reliable A/B testing.

1. Caching & Optimization Plugins

Caching, minification, and JavaScript optimization can sometimes prevent Nelio A/B Testing from correctly appending its tracking scripts or loading the right variant.

What to Watch Out For

These features often cause conflicts:

  • Minify / compress JavaScript
  • Combine JavaScript files
  • Defer or async JavaScript
  • Delay loading of scripts
  • Critical CSS / inline JS optimization
  • HTML caching
  • CDN-level caching (Cloudflare, etc.)

What to Exclude

You should exclude Nelio A/B Testing scripts from any caching or optimization rules.

Most plugins let you add exclusions by script name. Please exclude:

JavaScript files

  • nelio-ab-testing-main

Inline JS

  • nelio-ab-testing-main-js-before (contains the nabSettings variable)

Inline style

  • nelio-ab-testing-overlay

After Changing Cache Settings

Always:

  • Clear/purge your WordPress cache
  • Purge your CDN (Cloudflare, Fastly, Akamai…)
  • Purge your host’s server cache if applicable
  • Reload the page in your browser using a private/incognito window

Example: OptimizePress / WP Rocket / LiteSpeed Cache

Most optimization plugins include an “Exclude JavaScript” panel. Here is an example of how to do so if you are using OptimizePress. Example entry:

nelio-ab-testing-main
nelio-ab-testing-main-js-before
nelio-ab-testing-overlay

If a plugin optimizes inline JS, add the entire string: nabSettings

2. Security/Firewall Plugins

Some WordPress security plugins block outbound or inbound requests to APIs, which can prevent:

  • Tests from syncing
  • Variant allocation
  • Conversion actions from being recorded

Nelio A/B Testing uses the WordPress REST API to communicate with Nelio Cloud.

What to Allowlist

Make sure your security plugin does not block:

REST API URL

/nab/api

Nelio Cloud domain

https://api.nelioabtesting.com

Plugins to Check

  • Wordfence
  • Sucuri Firewall
  • iThemes Security
  • Defender
  • MalCare
  • Shield PRO

Most have settings for allowlisting REST endpoints or unblocking external API requests.


3. SEO Plugins (Query Parameter Cleanup)

Some SEO plugins include a feature that removes unknown query parameters from URLs. This can break A/B testing because Nelio uses a parameter like:

?nab=012345

to assign the correct variant.

What to Allow

In your SEO plugin settings, make sure the parameter nab is not removed.

If you see a setting like:

  • “Strip unknown parameters”
  • “Clean URLs”
  • “Crawl optimization”

→ Add an exception for:

nab

or a regular expression:

^nab

Plugins to Check

  • RankMath (Crawl Cleanup Tool)
  • SEOPress (URL Rewriting)
  • Yoast SEO (rare, but still check)

4. Browser Ad Blockers

Some ad blockers (overzealously) block the domain:

api.nelioabtesting.com

This prevents data collection for affected visitors.

Nelio A/B Testing never collects personal data and is fully GDPR/CCPA compliant, but some blocking lists unfortunately target the domain.

How to Avoid Tracking Loss

If you want to ensure all visitors are tracked, even if they use ad blockers, enable the Cloud Proxy feature.

Cloud Proxy changes the tracking URL to your own domain.

This avoids third-party blocking and improves reliability.

You’ll find the setting in: WordPress Dashboard → Nelio A/B Testing → Settings → Cloud Proxy

We recommend enabling it if you expect a significant portion of your audience to use ad blockers.

Summary: Quick Troubleshooting Checklist

If you suspect a compatibility issue:

  • A/B test doesn’t run → check caching & SEO plugins
  • Conversions not tracking → check ad blockers & Cloud Proxy
  • Tests not syncing → check security/firewall allowlists
  • Variants always the same → check caching rules
  • Wrong version visible after stopping test → purge caches (WP + CDN)

Whenever you install a new plugin that handles caching, optimization, or security, it’s a good idea to revisit these settings.