Skip to content

Getting started

Install the snippet once, then create, preview and launch experiments from the dashboard.

1. Add your domain

In the dashboard open Settings → Domains & snippet and add the domain you want to test on. Each domain gets its own install snippet with your account ID.

2. Install the snippet

Paste the snippet as high as possible inside the <head> of every page. It looks like this (copy the real one from the dashboard — it contains your account ID):

<!-- SplitTesty -->
<script>(function(w,d,a,p,u,t,h){if(w.__SPT_EDITOR__||w._spt)return;var c=w._spt={a:a,api:p,t:t,h:h,s:Date.now()};var q=w.SplitTesty=w.SplitTesty||[];if(!q.track)["track","revenue","identify","activate","consent","onAssigned"].forEach(function(m){q[m]=function(){q.push([m].concat([].slice.call(arguments)))}});var r=c.r=function(){var e=d.getElementById("_spt_hide");e&&e.parentNode&&e.parentNode.removeChild(e)};var s=d.createElement("style");s.id="_spt_hide";s.textContent=h+"{opacity:0 !important}";(d.head||d.documentElement).appendChild(s);setTimeout(r,t);function L(){var j=d.createElement("script");j.src=u;j.async=true;j.onerror=r;(d.head||d.documentElement).appendChild(j)}L()})(window,document,100001,"https://edge.splittesty.com","https://app.splittesty.com/spt.js",2000,"body");</script>
<!-- /SplitTesty -->
  • Asynchronous (default): the page keeps loading while the runtime is fetched. To avoid flicker, the configured element (default body) is hidden for at most the settings timeout (default 2000 ms) and is always revealed afterwards, even if a request fails.
  • Synchronous: blocks rendering until the runtime has loaded. No flicker at all, at the cost of load time.

3. Verify the installation

Use “Check installation” on the domain card, or simply open your site: the domain switches to “Connected” as soon as the snippet requests its settings. Add ?spt_debug=1 to any page URL to see what the snippet does in the browser console.

4. Create and launch a campaign

Create a campaign, define its pages, build variations in the visual editor, choose a primary metric and start it. Use “In QA” or a preview link to check a variation before it receives traffic; previews never count data.

How the snippet works

  • It requests only the campaigns that can match the current URL and caches the answer.
  • Visitors are bucketed deterministically, so they keep seeing the same variation.
  • Changes are re-applied on single-page-app navigation and when elements appear later.
  • Events are sent in small batches; no personal data is collected.

Next steps