onSuccess issue with Firefox fix | Community
Skip to main content
New Participant
March 9, 2021
Question

onSuccess issue with Firefox fix

  • March 9, 2021
  • 1 reply
  • 4147 views

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>

 

1 reply

SanfordWhiteman
New Participant
March 9, 2021

You'll need to link to your page. I suspect if you look in the F12 Console you'll see an error because GA is not actually loaded (which means the onSuccess will error out).

Thuy_PhamAuthor
New Participant
March 9, 2021

@SanfordWhiteman oh yes, here's the link: bugsnag-staging-mktg.webflow.io/test-demo-firefox-2

SanfordWhiteman
New Participant
March 9, 2021

That page has a different onSuccess from what you showed above.