Running multiple experiments on Google Analytics Experiments from the same page?
Asked Answered
D

3

9

Does anyone know how I can set up and run simultaneously multiple experiments (or a single one, for that matter) off two pages (original and variation) with a dozen links to signup pages to figure out which one of the two variations produces better conversion (how many people click to go to signup pages from either one of the two variations and which ones converts better) + to figure out how many people have viewed a video on any of the dozen possible signup pages?

I can't figure this out, because I can only set up a single goal (ending up on a specific signup page, I have to enter that page's full URL, so I have to create a dozen goals, one for each page) and then assign that goal to a single experiment. And if I try and replicate that experiment and assign it a different goal, at the end when I try and run it, it tells me that it's sharing code with an existing experiment and starting the new one will end the old one.

I kinda want them to run simultaneously.

Or, even better, how (if possible at all) do I set up a single experiment to track all this?

Discursion answered 1/8, 2014 at 20:32 Comment(0)
C
7

It seems there are two questions in this

  1. How do I track multiple goals with Google Experiments
  2. How do I run multiple experiments on the same page?

For number 1, this might be a good reference but in short you can't track multiple goals which is why they give you an option to rewrite the data from variations into the original URL in content reports. You then have to sift through the data manually. In all honesty, I think the best way for you to track from different variations most relaibly is to simply make your event tracking dynamic so that it is aware of which variation you are on. So for example, if you have click-tracking set up on your buttons you could do something like

var variationNum = 1; // variation you are on 
$('.element-to-track').on('click', function(e) {
  ga('send', 'Variation ' + variationNum, 'Event Action', 'Event Label');
})

For number 2, how to run multiple experiments, it really requires to have multiple experiments and then using the cxapi and then grabbing the variation for each of those experiments. This answer provides a lot of insight but essentially the cxapi lets you set variation for the user for specific experiments.

cxApi.setChosenVariation(variation1, ‘YByMKfprRCStcMvK8zh1yw’);
cxApi.setChosenVariation(variation2, ‘FAsjnfJKFASywafasaFSAa’);

Set the user will be put into those two experiments independently of each other. Unfortunately the determination of variation, which you usually use cxapi.chooseVariation() requires you to do load the api with the specific experiment ID in mind.

One thing I did notice is that you technically can make the request twice and passing the separate parameter will make it so that it does have the chooseVariation() but not sure if this is the cleanest solution.

  <script src="//www.google-analytics.com/cx/api.js?experiment=YByMKfprRCStcMvK8zh1yw"></script>
  <script>
    var variation1 = cxApi.chooseVariation();
  </script>
  <script src="//www.google-analytics.com/cx/api.js?experiment=FAsjnfJKFASywafasaFSAa"></script>
  <script>
    console.log('Experiment FAsjnfJKFASywafasaFSAa');
    var variation2 = cxApi.chooseVariation();
    console.log(variation2);
  </script>
  <script>
    cxApi.setChosenVariation(variation1, 'YByMKfprRCStcMvK8zh1yw');
    cxApi.setChosenVariation(variation2, 'FAsjnfJKFASywafasaFSAa');
  </script>

Hope this helps.

Commencement answered 20/10, 2015 at 22:15 Comment(7)
After playing a lot more with cxApi I realize that using the cxApi to choose the variation may not truly be necessary. In fact, if you wish, you can do this server-side or use your own logic to determine how people are bucketed. There are some advantages for doing it through cxApi but there are also drawbacks.Commencement
So if you use setChosenVariation() multiple times on one page (one for each experiement), is it guaranteed that the visitor will only get into one of those tests and will not see multiple tests at the same time?Laminate
@JakeWilson well so that's the thing -- this is for if you want people to be able to see multiple experiments at the same time on the same page. The issue though is you want people to get bucketed independently of the experiments. Let's say for example your first test has 3 variations and your second experiment has 4 and maybe one you're using multi-armed bandit and the other is an equal split. setChosenVariation will segment people differently based on the experiment. By specifying the experiment ID, it'll make sure that this isn't an issue.Commencement
Seems like having a visitor land in 2 different tests on the same page would be really bad. You have no idea which test is really affecting your goals if the visitor is seeing both. Does that make sense?Laminate
@JakeWilson Yup I totally agree. You'd have to look at all permutations of both of the tests. The only way this might be valid would be if you knew that both tests would not affect each other (which is really difficult to guarantee). You also need to make sure both tests are independently segmenting people which is what I showed above. For this answer, I was speaking more from the "is this possible?" rather than the "should I do this?" :P I do know some companies will do this just to move fast though.Commencement
Calling setChosenVariation() is unnecessary. chooseVariation() takes care of storing the chosen variation in the experiment cookie.Assort
@Assort good point my bad. I'll update my answer in a bit.Commencement
T
0
  1. Capture events for meaningful actions
  2. Set up a goal for an experiment you’d like to perform using the final event as the trigger
  3. Set up an experiment based on that goal
  4. Repeat from step one. You can have as many experiments as you have goals. Your goals can have the same event with a different goal name to track specific initiatives.
Trinitrophenol answered 29/10, 2014 at 20:43 Comment(0)
A
-2

Google optimize is a new product by google that can run several A/B tests on a single page. The products comes with fancy reporting screens to analyze the results.

google optimize

The free plan allows running 3 concurrent experiments. You can also see the results in google analytics.

Assort answered 2/6, 2017 at 20:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.