Google Analytics Content Experiments A/B testing server-side code without page refresh

后端 未结 2 1428
南旧
南旧 2020-12-03 19:58

Basically, we want to A/B test 2 different page layout headers. There are some structural differences (it\'s not just switching out the CSS). We also don\'t want to wait fo

相关标签:
2条回答
  • 2020-12-03 20:35

    We've been using a totally different approach for the past couple months: Amazon load-balancers (AWS ELB) plus Google Analytics (not Content Experiments). (See my comment above.) As we hoped, it has greatly improved our experience with merging back to trunk.

    _gaq.push(['_setCustomVar', 2, varName, varValue, 2]);//https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCustomVariables
    _gaq.push(['_trackPageview']);//This must come AFTER the setCustomVar
    //varName should be whatever you want to call the experiment
    //varValue should be something like "original" for the original and "variation" for the variation.  We just use "trunk" and [name of variation branch].
    

    Obvious drawbacks are that Google doesn't do the math for us (telling us whether the variation has statistically significantly outperformed the original) and that we can't easily run multiple experiments at once. We also wouldn't be able to have many variations (we'd need to add more load-balanced instances than we'd want).

    But for our purposes (e.g. given how important it is to us not to have a page refresh), it has worked better than other approaches.

    0 讨论(0)
  • 2020-12-03 20:35

    @danmaz74 took an interesting approach to this using only Google Analytics on the client side as well:

    https://github.com/danmaz74/ABalytics

    0 讨论(0)
提交回复
热议问题