Using the External Page Script
The External Page Script lets you load Nelio A/B Testing on pages that aren’t generated by WordPress but are still served from your WordPress domain.
Normally, Nelio A/B Testing automatically inserts its tracking script into every WordPress page. For pages built with external services or custom applications, you can manually add the External Page Script instead.
Once installed, the script loads test variants and tracks test events just like it would on a regular WordPress page.
⚠️ Important: This feature is intended for advanced integrations. If all your pages are generated by WordPress, you don’t need to use the External Page Script.
When Should I Use It?
Use the External Page Script when part of your website is served from your WordPress domain but isn’t rendered by WordPress.
Typical examples include:
- custom applications;
- landing pages generated by external services;
- headless or hybrid architectures;
- pages rendered by another framework running on the same domain.
If the page is generated by WordPress, Nelio A/B Testing automatically inserts the required script and no additional configuration is necessary.
How to Add the Script
Copy the script provided in Nelio A/B Testing → Settings → Misc. Then add it at the very beginning of the <head> element of the external page.
The script acts as a manual replacement for the one Nelio A/B Testing would normally inject automatically into WordPress-generated pages. Adding it elsewhere in the page may prevent variants from loading correctly or cause visible flickering before the appropriate variant is applied.
Did you find this useful?
Thanks for your feedback!
Not what you’re looking for? Ask us directly:


