http-redirectgoogle-analyticssettingstrackinggoogle-experiments

Google analytics experiment redirect


Hi I have an issue with experiments.

This is my original page: http://cellulem.netlogiq.com/test1.html

and the variations 1: http://cellulem.netlogiq.com/test2.html

The problem is when I access the test1.html page, it redirected me always on the same page, after a few seconds.

I inserted the experiment code right after the head tag, and after that the tracking code. so any ideas why???


Solution

  • This sounds like expected behaviour. The experiment redirects you to the same page because recurring visitors need to see the same page for every pageview/visits (it would confuse the heck out of your visitors were they to see different pages for every pageview, plus it would ruin your experiment).

    Try and delete your cookies between reloads so the Google does not recognize you as recurring visitor. Try at least ten reloads (the code redirects randomly, not alternating - it's not unusual to get the same page four or five times in a row if you just have one variation).

    Updated to include the discussion from the comments:

    The experiment code only goes into the original page (else there will be unwanted redirects on other pages). If you have a common header in your template you could check if you are on the original page by inspecting the current url, like so:

    if(window.location.href === 'original.html ') { 
    // display experiment code 
    }