Skip to main content
Level 2
Mar 9, 2021 12:27 AM UTC
Question

onSuccess issue with Firefox fix

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>

 

11 replies

SanfordWhiteman
User Group Leader
User Group Leader
Mar 9, 2021 2:14 AM UTC

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

Translate
Thuy_PhamAuthor
Level 2
Mar 9, 2021 10:23 PM UTC

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

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Mar 9, 2021 10:52 PM UTC

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

 

 

Translate