Optimizely Variation Redirect Issue
I created a test with a control and only 1 variation. The variation contains JS code that redirects to the same URL with a query string added. That's the only thing the variation does.
I created a goal named "Track GetStarted Visitors" that looks for that query string. It's really a meaningless goal that was going to be deleted, but we're confused by the results. It appears as though only 65% of folks bucketed in variation 1 are being redirected, even though the redirect should run for everyone. Could there be an optimizely quirk that is conflicting with the JS we added to variation 1?
I also attempted to use the native redirect in the variation menu, but it resulted in an infinite redirect, which is why I attempted the custom JS. Any thoughts on what could be going on? The experiment ID is: 2408930090
Have you setup your redirect experiment exactly as stated in our article, here?
If so, please double check your URL targeting - this is the main cause of infinite loops. This is where your URL targeting includes the redirected URL, which means your experiment will run on your original and then on your variation (redirected URL) which means it will keep trying to redirect on every page load, causing an infinite loop, hence why we try to avoid this in our setup. Please see point 4 of the above setup article.
If your'e using a custom setup, feel free to post any extra details in your setup that may be useful for us to know - hopefully someone will have some ideas of how to help!
So in URL Targeting I have:
mydomain.com/mypage with "exact match" selected.
Then I go to variation 1 -> redirect to a new page... (in the subheader menu while editing an experiment) and I enter this:
If I type that into the URL Match Validator in the "URL Targeting" overlay it doesn't match(because I chose the exact match option). However if I click "preview" I'm still in an infinite redirect loop. I also tried terminating the infinite loop by canceling the request in my browser and grabbed the URL and dropped it in the URL Match Validator and it still failed to match, yet I'm still in the loop. My URL looks something like this when I terminate the request in my browser(with actual values masked):
Am I missing something here? I've also tried waiting 10 minutes or so in case the changes took some time to take effect. Also, yes I clicked save : )
If you are redirecting to the same URL but with a QueryString parameter, did you add a URL Targeting condition to exclude URLs that contain the new parameter?
I've managed to get the standard optimizely redirect in place without running into an inifite redirect. However, only a bit over 50% of the traffic that is bucketed into variation 1 ever gets redirected successfully. Any insight on what could be blocking this redirect?
Any advice would be greatly appreciated : )