How to setup Google Content Experiments with the original Url and without query string parameters

1.6k views Asked by At

I want to set up a Google Content Experiment to do A/B testing on the homepage by testing the addition of a new button in the header menu. When setting up the experiment, Google forces you to have two unique Urls. Another problem is the experiment code adds a query string parameter to the Url which is far from ideal. I don't want to be redirecting users off to a different page or even the same page with a query string parameter. Here is what it looks like: mysite.com?utm_expid=XXXXXXX-X

I found that you can edit Google's experiment JavaScript to get closer to what I want, but I'm not sure if this will collect data correctly or if editing the code is supported.

//This line returns the variation number (0=Control, 1=Variation 1) 
//so I can show or hide the test button bases on this variable:
  var combination = utmx('combination');

//Removing this line eliminates the redirect:
  utmx('url','A/B');

How can I do a simple A/B test while preserving the original Url of the page?

1

There are 1 answers

1
Ryan On

I personally found Google Analytics Content Experiments (and its predecessor Google Website Optimizer) to have more drawbacks than benefits, so I've started using straight Google Analytics + Amazon load-balancers like so: https://stackoverflow.com/a/12956940/470749