All articles

A|B Split Test Beta script

2017-03-24 15:35:49 by Rolands,

When using our beta A|B testing tool, please use this code:

<script type="text/javascript">
var smcabkey = 'YOURABSPITTESTTAG';
var smcabdomain = 'tut.cloud';
var simplemediacode_abtest = document.createElement('script');
var smcabstring = '//' + smcabdomain + '/' + smcabkey + '.js?rand=';
simplemediacode_abtest.src = smcabstring + Math.random();
document.documentElement.firstChild.appendChild(simplemediacode_abtest);
</script>

where YOURABSPITTESTTAG replace with the provided key. Domain tut.cloud might be different (from client to client)

Use this code in your page's <head> section or via Google Tag Manager (GTM instructions below). From this moment campaign is ON! Congratulations!

Preview option

To preview changes use ab_preview URL parameter with value 1, like: ?ab_preview=1 or &ab_preview=1.

Examples:

  1. https://team.house/?ab_preview=1 or https://team.house/index.php?ab_preview=1;
  2. https://team.house/?some=thing&ab_preview=1&i=like or https://team.house/index.php?some=thing&ab_preview=1&i=like;

General availability

This code will change in future! This is public BETA.

Google Tag Manager instructions

  1. Login into GTM https://tagmanager.google.com/?hl=en#/home;
  2. Chose your domain (or add new) ;
  3. Under Tags from left side menu chose tag to edit (or create new);
  4. Paste your code (don't forget to change YOURABSPITTESTTAG parameter);
  5. Check "Support document.write";
  6. Under Tag firing options chose Unlimited;
  7. Under Triggering chose All pages -> Page views;
  8. ... and SAVE (top right corner)!

Next:

Don't forget to PUBLISH changes (top right corner);