We ran into some Firefox issues with the form not appearing in private browsing or in strict protection setting so I applied @SanfordWhiteman's fix (Really, finally winning the Marketo Forms vs. Tracking Protection battle). That fixed the form, but when I added the onSuccess handler back in, the form does not go to the confirmation page.
Does anyone know of a solution?
<script src="//lp.bugsnag.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_1181"></form>
<script>MktoForms2.setOptions({
formXDPath : "/rs/053-NAZ-226/images/marketo-xdframe-relative.html"
});
MktoForms2.loadForm("//lp.bugsnag.com", "053-NAZ-226", 1181, function(form){
//Hidden field
form.addHiddenFields({"formProgramName":"EG-Demo-Request"});
//Add an onSuccess handler
form.onSuccess(function(values, followUpUrl) {
ga('send', 'event', {
eventAction: 'Demo Requested',
hitCallback: function() {
document.location.href = "https://bugsnag-staging-mktg.webflow.io/demo-request-confirmation";
}
});
// Return false to prevent the submission handler continuing with its own processing
return false;
});
});
</script>
... View more