Google Analytics Content Experiments: Possible to setup Variations for Multiple Pages at once?

8.4k views Asked by At

I've recently learned about the new Google Analytics Content Experiments which looks interesting. ( http://analytics.blogspot.nl/2012/06/helping-to-create-better-websites.html )

The standard usecase seems to be that for a certain page, say a product detail page, you supply variations (different urls) and select a percentage of users that are included in the test. Such a user will be presented a variation of the product-detail page (and will continue to be presented the same variation over and over for continuation/ux reasons, based on cookies presumably) .

All fine and good.

However, say I have 100 products on my site. Just testing a variation on 1 of those products has imho the following disadvantages:

  • slow progressing tests because of lower nr of visitors.
  • the test isn't isolated. I.e: since other product detail pages aren't included in the test, displaying a variation-page for 1 product-detail page while all other product-detail pages show the original can (will) lead to a confusing experience (and thus skewed conversion statistics) for the user that browses multiple products, which most of them do.

To me it seems far better to be able to dynamically include all products of a certain type into the same test (e.g: all TV's) , for example by enabling to set some regular expression or other filter on urls to include in the test.

Is such a thing possible currently, scheduled, useful, or completely missing the point?

EDIT

Part of the solution seems to be "relative urls" https://support.google.com/analytics/bin/answer.py?hl=en&answer=2664470

Taking the previous example one step further, we can see how the use of relative URLs lets you easily run an experiment on a set of different original pages, and test visual alternatives across that group of pages (e.g., the product pages in an e-commerce site).

Remaining question: How to dynamically tag which pages belong to the experiment (e.g: based on regex)

Thanks.

5

There are 5 answers

5
wal5hy On BEST ANSWER

The solution is to use relative url for the variation page.

E.g. you have a number of product pages:

www.mysite.com/products/eggs.html
www.mysite.com/products/cheese.html
www.mysite.com/products/bread.html
etc.

For each page you have a matching variation page:

www.mysite.com/products/eggs.html?var=bigpicture
www.mysite.com/products/cheese.html?var=bigpicture
www.mysite.com/products/bread.html?var=bigpicture
etc.

You want to use all the product pages in 1 experiment.

Go To google Analytics Content Experiments: For the orginal page choose ONE of the many product pages (e.g. www.mysite.com/products/eggs.html) (This is just to get the experiment code and provide GA with an example page)

For the variation page choose relative url and put ?var=bigpicture

Then place the javascript required for the experiment on ALL the original product pages you want in the experiment

Google Content experiments Dynamic URL product pages

For more information see: http://support.google.com/analytics/bin/answer.py?hl=en&answer=2664470&topic=1745208&ctx=topic

0
mrbo On

There is also a way to the A/B testing with GA without experiment API if you really want to keep things simple. The idea behind it is to create your own split parameter and than you can pass it to GA as a custom variable. So you can yous your own development tools to differentiate the content in the groups and you don't have to use redirect. Here is a simple tutorial how to do this: link.

0
Randy Greencorn On

I recently implemented a GA experiment to test out different text on a nav bar across many pages. This is what worked for me:

  • Set up the experiment in GA for a single page. E.g. index.html and index.html?var=menu2.
  • Implement the solution across multiple pages. Specifically, insert the GA experiment code in all the pages that you want to run the test. Then ensure that your page(s) can render the page variation based on the parameter passed. My php code went something like this: If var=menu2, display page with menu2; otherwise, display original menu.
3
jammus On

OK, so a solution to this is:

  1. Create experiment.
    Chose a placeholder url for your original url. Something like www.example.com/products/eggs. Set variations as relative urls eg ?var=large_heading, ?var=small_price

  2. Have some mechanism on the server-side which determines if the current user is part of the experiment. A simple cookie is good enough. If this cookie is present show a variation of the page.

  3. If the user visits a product page but isn't in an experiment then show the javascript given when you created an experiment.

  4. Add something to your product page which checks for the querystring var=[something]. When detected show the appropriate variation as well as setting the cookie which tells marks the user as being in an experiment.

You can hack around the JavaScript that Google gives you to make this a bit easier. Something like:

var variation = utmx('variation_code', 'A/B');
if (variation) { set_a_cookie(variation); }
utmx('url', 'A/B');

This is largely cribbed from the GWO Techie Guide. http://static.googleusercontent.com/external_content/untrusted_dlcp/www.google.com/en//websiteoptimizer/techieguide.pdf

0
Max Favilli On

Use the Javascript API as described here:

https://developers.google.com/analytics/devguides/collection/gajs/experiments#pro-server

You can set the experimentid programmatically in your code, on every page. Of course you need first to create the experiment in GA, in doing so provide GA fake urls for each variation, discard the GA generated code, ignore the validation errors. And just use the experimentid as described in the link above.