Question

I want to run an A/B-test or an experiment for whole part of the site. For example on my /blog/ page, where one variation would have a newsletter form and other variation a free ebook download button.

The problem is that I have to use a full URL path for the experiments, for example /blog/2013/article/1?var=1 and /blog/2013/article/1?var=2 With this method I would need create a new experiment for each blog post. This is impossible.

Any tips on how to approach this?

Was it helpful?

Solution

It's possible, but the documentation is lacking.

When you choose your variation URLs, you need to use relative instead of http://. This let's you use query parameters to define the variations, instead of the full URL. In your example, you would define your original page as:

http: //www.example.com/blog/2013/article/1

and your variation URLs would be ?var=1, var=2, etc. using relative as the option in the dropdown (instead of http:// or https://).

Here's the not-so-clear documentation on using relative URLs for your variations: https://support.google.com/analytics/answer/2664470?hl=en&ref_topic=1745208

One important thing to remember is that if you're doing it this way, you need to include the content experiment code on every "original" page.

There's also another way to have even more control over serving the variation pages and controlling the experiment using the Content Experiments JavScript API. This is a relatively new feature - you can see the developer documentation about this here: https://developers.google.com/analytics/devguides/collection/gajs/experiments

OTHER TIPS

I am not sure this is possible. You might look at a more robust yet simple to use tool like Visual Website Optimizer or Optimizely.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top