A/B test with Google Web optimizer; what cookie tells me visitor got A or B

落花浮王杯 提交于 2019-12-12 09:53:13

问题


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.


回答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.




回答2:


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.



来源:https://stackoverflow.com/questions/3623447/a-b-test-with-google-web-optimizer-what-cookie-tells-me-visitor-got-a-or-b

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!