Schedule a meeting

How to run A/B tests without a developer

Written by
We pride ourselves on spending a lot of time planning features that end up saving our clients a lot more time. This is one of them.

I won’t bore you with what A/B testing is. You probably already know and, if you don’t, far more experienced people have written about it before. Most A/B testing tools rely on redirects – a bit of JavaScript code that sends people to one page variation or another, randomly.

Google Analytics’ Experiment code is probably the beefiest of all and it looks like this:

<!– Google Analytics Content Experiment code –>

<script>function utmx_section(){}function utmx(){}(function(){var



function f(n){if(c){var i=c.indexOf(n+’=’);if(i>-1){var j=c.

indexOf(‘;’,i);return escape(c.substring(i+n.length+1,j<0?c.

length:j))}}}var x=f(‘__utmx’),xx=f(‘__utmxx’),h=l.hash;d.write(

‘<sc’+’ript src=”‘+’http’+(l.protocol==’https:’?’s://ssl’:


‘&utmx=’+(x?x:”)+’&utmxx=’+(xx?xx:”)+’&utmxtime=’+new Date().


‘” type=”text/javascript” charset=”utf-8″><\/sc’+’ript>’)})();


<!– End of Google Analytics Content Experiment code –>

You can play around with Visual Website Optimizer, Kissmetrics, Optimizely, LeadPages and so on. The basic principle is the same – the bit of code needs to be present on the Original Page so it knows from where to redirect people. Now, if you run a lot of tests (and you should), having to ask a developer for help each and every time you want to run an experiment can be taxing (time and budget-wise).

The simplest thing you can do to cut a lot of maintenance hours is a simple request: ask your dev team to add a feature to your CMS. You already have meta-data fields (if you don’t… you should). Have your devs add a similar field that injects any content present there in the page’s HTML structure, right before the </head> tag.

Depending on how the CMS was built, developing this might take them a while, but not too much. Expect at most a couple of hours.

Once they do that, you’ll be able to run your experiments without their help. Just pop-in the JS code in its designated field, configure your test in whatever A/B testing app you choose and you’re set.

If you want to read the entire article, please find a download link below containing an extensive research on this topic

Looking for more information?