3

When using Google Website Optimizer A/B split test, is there a way I can read a cookie to see which version A or B did the user get? I need to know this from a page other than the control page.

Yahel
  • 37,023
  • 22
  • 103
  • 153
claya
  • 1,920
  • 1
  • 18
  • 32

2 Answers2

1

I'm not familiar with any way to parse the _utmx/_utmxx cookies like that.

Your best (and simplest) bet is to cookie them yourself on those various pages, and then access those cookies as you need them. On the control page, be sure to put the cookie-placing code below the control script, so that it doesn't cookie them every time before it redirects.

Yahel
  • 37,023
  • 22
  • 103
  • 153
  • ok thanks. do you know what the api for utmx js function is? I've seen some calls to it to get variation info. – claya Sep 02 '10 at 17:58
  • 1
    you can find some documentation on __utmx here http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.html#HowGAUsesCookies but it's not much. – erikvold Sep 03 '10 at 06:35
1

Using JavaScript, you could extract the variation number client side and place it into a cookie, see my post here for details ( http://www.optimisationbeacon.com/testing/how-to-integrate-google-website-optimizer-with-google-analytics/ ), but you'll need the following code to get the combination number (undefined means the test is not running, 0 is A, 1 is B, and so on...):

utmx('combination')

That will get you the variation number. Otherwise, you can extract it from the cookie "__utmx":

222149575.00015140143722727739:2:0

The number on the end, "0" indicates this is version A or the original.

Robert Kingston
  • 369
  • 4
  • 14