Optimize
4.3K members online now
4.3K members online now
Get answers to frequently asked questions, read the glossary of testing terminology and explore some example experiment ideas to get the creative juices flowing.
Guide Me
star_border
Reply

just a few experiment sessions in 24hours in redirect test

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

We started to use Google Optimize in our website and tried to do a redirect test but get very few experiment sessions.

 

It seems to be that Optimize just serves a few % of al of our visitors the redirect page we would like to test

 

First redirect experiment we had:

- 148 experiments 

- 2 days

 

Because my primary objective in this test was 'conversion'  and we do not have so much conversions, I assumed that the primairy objective could be causing this issue

 

I set bounce rate as primairy objective, but it seems not te be better

 

- 31 experiments

- 18 hour

 

Can you help me out?

 

What could be the issue?

 

 

 

And does anybody have suggestions how can we solve this?

 

/Chris

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by James_Clemens (Top Contributor)
September

just a few experiment sessions in 24hours in redirect test

Google Employee
# 5
Google Employee

Hi

 

You have a bit of a complicated setup and I couldn't see your code live on your page, to be able to understand things better.

 

But the obvious problem that I can see, is that you are trying to use the ga('set', 'exp', window.currentExp) to control which Optimize variant will run.

 

This will not work, Optimize can't be controlled using that API. A solution for what you want to do would be to use javascript variable, or custom javascript targeting from the Optimize targeting rules. You could set a global window variable like

var experiment_I_want_to_run = .... (this needs to happen above the optimize snippet - if you can't do it that early, you will need to use custom activation events: https://support.google.com/360suite/optimize/answer/7008840?hl=en)

 

and then make a similar js variable rule and use it on targeting. See: https://support.google.com/360suite/optimize/answer/6301753?hl=en&ref_topic=6283433

 

View solution in original post

just a few experiment sessions in 24hours in redirect test

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Hi, we are seeing the same thing. Did you find a solution for this issue?

just a few experiment sessions in 24hours in redirect test

Google Employee
# 3
Google Employee

Hi

 

Have you been using the page hiding snippet? Could it be that there is something wrong (i.e. you load optimize very late blocked by a slow sync script) and page hiding always times out?

If you still haven't been able to figure out the issue, could you share your container ID?

Re: just a few experiment sessions in 24hours in redirect test

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Hi Dimitris D!

 

A quick background: We use Google Tagmanager for almost all the scripts on our site (https://www.askundervisning.no) but the documentation advised us against doing that for optimize. 

 

Also, we wanted to choose which experiment to show using our own code so that we didn't have to load optimize on each page on top of gtm. I therefore implemented a separate analytics snippet for just registering the experiment: 

 

 

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-33759209-1', 'auto',
{
allowLinker: false
}); // Update tracker settings
ga('require', 'GTM-K67LDFP'); // Add this line
ga('set', 'exp', window.currentExp);

 

To your questions:

1. Have you been using the page hiding snippet?

No, I evaluate a small snippet of js while the page loads to determine if the experiment should run

 

try {
    function getRandomIntInclusive(min, max) {
      min = Math.ceil(min);
      max = Math.floor(max);
      return Math.floor(Math.random() * (max - min + 1)) + min;
    }
    var exp = 1
    try {
      exp = window.localStorage.getItem('fp-msg-sf-exp')

      if (exp === null) {
        exp = getRandomIntInclusive(0, 1)
        window.localStorage.setItem('fp-msg-sf-exp', exp)
      } else {
        exp = parseInt(exp, 10)
      }
    } catch (e) {
      // happens in private browsing on safari
      window._raven_exceptions = window._raven_exceptions  || []
      window._raven_exceptions.push({message: "fp-msg-sf:" + e.message,
        type: typeof e})
      exp = getRandomIntInclusive(0, 1)
    }

    if (exp === 0) {
      var elm = document.getElementById("fp-msg-sf")
      if (elm && elm.classList) {
        elm.classList.add('fp-msg-sf-hidden')
      }
    }
    window.currentExp = 'NJhb0urnRxaKxgcUHdhMcA.' + exp
  } catch (e) {
    window._raven_exceptions = window._raven_exceptions  || []
      window._raven_exceptions.push({message: "fp-msg-sf:" + e.message,
        type: typeof e})
  }

 

 

Could it be that there is something wrong (i.e. you load optimize very late blocked by a slow sync script) and page hiding always times out?

See above Smiley Happy

 

I think something is wrong, but I'm not sure if it is a) the way I've integrated analytics or if it has to do with our tagmanager. Is there a way to register the current experiment using tagmanager so I do not have to load analytics separately?

 

kind regards,

Tarjei

Marked as Best Answer.
Solution
Accepted by James_Clemens (Top Contributor)
September

just a few experiment sessions in 24hours in redirect test

Google Employee
# 5
Google Employee

Hi

 

You have a bit of a complicated setup and I couldn't see your code live on your page, to be able to understand things better.

 

But the obvious problem that I can see, is that you are trying to use the ga('set', 'exp', window.currentExp) to control which Optimize variant will run.

 

This will not work, Optimize can't be controlled using that API. A solution for what you want to do would be to use javascript variable, or custom javascript targeting from the Optimize targeting rules. You could set a global window variable like

var experiment_I_want_to_run = .... (this needs to happen above the optimize snippet - if you can't do it that early, you will need to use custom activation events: https://support.google.com/360suite/optimize/answer/7008840?hl=en)

 

and then make a similar js variable rule and use it on targeting. See: https://support.google.com/360suite/optimize/answer/6301753?hl=en&ref_topic=6283433

 

just a few experiment sessions in 24hours in redirect test

[ Edited ]
Visitor ✭ ✭ ✭
# 6
Visitor ✭ ✭ ✭

thanks, just not find a solution.
My website: 192.168.l.l