Search for articles…
Install the snippet on any website
Splitlab works on any website where you can add code to the page <head>: hand-coded HTML, a static site, or a CMS with a “custom head code” field. This guide shows you how.
1. Copy your snippet
In Splitlab, open Websites and select your website.
In the Install Smart Code panel, stay on the HTML tab.
Leave Include anti-flicker script on. Turn on Enable Cookie Consent only if your site has a cookie banner (see step 4).
Click Copy.
The snippet already contains your project key, the data-project-key value on the engine script. That key is the only part that differs from one site to the next.
2. Paste it into the head of every page
Paste the snippet into the <head> of each page you want to run tests on, as near the top as you can, then publish your site.
Position matters. The anti-flicker script needs to run before your content appears, so visitors never see the original page flash before their variant is applied. If your site shares a header template across pages, adding it there covers every page at once.
3. Keep the anti-flicker script
The anti-flicker part hides the page while the engine applies the visitor’s variant, then reveals it. It always reveals the page within 3.5 seconds, and immediately if the engine is blocked from loading, so visitors are never stuck on a blank page.
You can leave it out if you don’t mind a brief flash of the original page before a variant appears. Tests still run either way. See Why do I see the original page flash first? if you notice flicker.
4. Decide on cookie consent
With Enable Cookie Consent on, the script doesn’t set cookies until the visitor accepts your cookie banner. Only turn it on if your site actually has a banner. Without one, nobody gives consent, so visitors aren’t tracked. The setting is part of the code you paste, so copy the snippet again whenever you change it.
5. Check the install
Follow Check that the snippet is installed to confirm the engine is loading.
6. Using a platform?
There are dedicated guides for ClickFunnels, WordPress, and Shopify, Wix, Google Tag Manager and Next.js. Developers can find every attribute explained in The install snippet.
7. Still stuck?
Snippet in place but nothing happening? 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