Rich-text Reply

Optimizely Variation Redirect Issue

cwahlen 02-16-15

Optimizely Variation Redirect Issue

Hello,

 

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

 

Thanks!!

-Casey

Level 2

Joel_Balmer 02-17-15
 

Re: Optimizely Variation Redirect Issue

Hi Casey!

 

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!

cwahlen 02-17-15
 

Re: Optimizely Variation Redirect Issue

I've tried changing my URL targeting to an exact match and still have no luck (I think I've tried this before)

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:
mydomain.com/mypage?myparam=1

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):

https://mydomain.com/mypage/?optimizely_snippet=****&optimizely_check_for_snippet=****&optimizely_sh...

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 : )

Thanks!
-Casey
Level 2
JDahlinANF 02-17-15
 

Re: Optimizely Variation Redirect Issue

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?

 

e.g.,

include:

mydomain.com/mypage

exclude:
(substring) myparam=1

or

(regex) .*myparam=1.*

cwahlen 02-17-15
 

Re: Optimizely Variation Redirect Issue

Thanks for the tip, although I did try that and still didn't have any luck. I'm also not sure I have to add an exclusion considering the URL Match Validator shows it as a non-match, right?
Level 2
cwahlen 02-23-15
 

Re: Optimizely Variation Redirect Issue

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 : )

Level 2