SplitDuck logosplitduck

Install script

Replace YOUR_SITE_KEY with your site key. Once you sign up, these instructions in your dashboard come with your key already filled in.

Paste this snippet into the <head> of every page on your site, as high up as possible, so it runs before the page is shown and visitors never see the copy switch.

<style id="splitduck-hide">[data-splitduck]{visibility:hidden}</style>
<script>
  window.splitduck = window.splitduck || { q: [], track: function () { this.q.push(arguments); } };
  setTimeout(function () {
    var style = document.getElementById("splitduck-hide");
    if (style) style.remove();
  }, 500);
</script>
<script src="https://splitduck.com/splitduck.js" data-site-key="YOUR_SITE_KEY" async></script>