Rich-text Reply

Button Destination Not Changing

ccamilleri 02-16-17

Button Destination Not Changing

I am trying to launch an experiment that is changing the button's marketo form ID as well as the destination URL that's linked to the button, once the form has been completed. I've pushed this live to test and it's still taking the user to the original URL. 

 

<script>
MktoForms2.loadForm("//app-ab04.marketo.com", "742-LCM-112", 1922, function(form){
form.onSuccess(function(values, followUpUrl) {
location.href = 'https://www.vocera.com/request-demo/thanks';

return false;
});
});
</script>

RyanC 02-16-17
 

Re: Button Destination Not Changing

Does the code work if you manually inject it in the browser console (F12 - on chrome)? Thus eliminating Optimizely from the equation, as it seems the custom javascript is at fault here.
Ryan
------------------------------------------------
The best solution is the simplest.
Level 11
ccamilleri 02-16-17
 

Re: Button Destination Not Changing

Can I make these edits without messing up the custom javascript?
ccamilleri 02-16-17
 

Re: Button Destination Not Changing

Also received Failed to load resource: https://app.optimizely.com/api/v1/layers/8237305957/live the server responded with a status of 404 ()