Search for articles…
Install Splitlab on WordPress
The Splitlab plugin adds the snippet to every page of your WordPress site, so you don’t need to edit your theme. It needs WordPress 5.7 or later and PHP 7.4 or later.
1. Install the plugin
In your WordPress admin, go to Plugins → Add New and search for Splitlab.
Click Install Now, then Activate.
If the plugin doesn’t appear in search, contact us for the plugin file and upload it under Plugins → Add New → Upload Plugin.
2. Find your project key
In Splitlab, open Websites, select your website and open the Wordpress tab in the Install Smart Code panel. Your project key is the data-project-key value.
3. Save the key in WordPress
Go to Settings → Splitlab.
Paste your Project key and click Save Changes.
Nothing is added to your pages until a project key is saved. The other settings can stay on their defaults:
Anti-flicker (on) hides the page until the visitor’s variant is applied.
Reveal anyway after (3000 ms) shows the page regardless if the engine hasn’t loaded by then. It accepts 500 to 10000 ms.
Server API key is only needed for WooCommerce revenue.
Environment should stay on Production.
4. Purge your page cache
A full-page cache keeps serving pages built before the plugin was active. Purge it after saving the key, or the snippet will only appear as old cached pages expire.
5. Check your optimisation plugin
Plugins that defer, delay or combine JavaScript can cause a flash of the original page, or a blank page for a few seconds. The Splitlab plugin already opts out of WP Rocket, LiteSpeed Cache, Cloudflare Rocket Loader and Autoptimize.
If you use a different optimiser and see either problem, exclude mvt-anti-flicker, mvt-engine-script and cdn.splitlab.io in its JavaScript settings.
6. Verify the install
Follow Check that the snippet is installed.
7. Avoid installing twice
If you previously pasted the snippet into your theme or a header-code plugin, remove that copy. The plugin is enough, and running both loads the snippet twice. The full reference is in the WordPress guide.
8. Still stuck?
Plugin active but the check still fails? Get in touch through our contact page or email team@splitlab.io and tell us which page or integration you’re working on.
Related articles
Still stuck?
Email team@splitlab.io or send us a message.
Contact us