SOLVED

Background form submits (sometimes) don't work.

Go to solution
msutton
Level 2

Background form submits (sometimes) don't work.

Hey, all! I'm just about out of ideas on this and am hoping the community can spur some insight.

 

We use a Webflow site and are setup using native forms. Native forms submit back to Webflow and we can download a list of all form submissions. This has been my saving grace as it's the only way I know this is even happening. The issue is that about 8% of the time a site visitor submits a form and the Marketo background form submission never fires. Eek!

 

I checked for dependencies and tested different browsers and adblockers. I can resubmit these using the data captured by the native form handling and resubmit without error every time. I don't know that I've been able to reproduce the issue at all.

 

Any thoughts come to mind on how I might continue troubleshooting this?

 

 

<script src="//app-XXXX.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_9999" style="display: none !important"></form>
<script>
	MktoForms2.loadForm("//app-XXXX.marketo.com", "XXX-HCT-XXX", 9999);
</script>
<script>
	$("#optin-form-button").click(function (e) {
		if ($.trim($("input#email").val()) != "") {
			MktoForms2.whenReady(function (myForm) {
				if (myForm.getId() == 9999) {
					myForm.addHiddenFields({
						Email: $("input#email").val(),
						FirstName: $("input#fname").val(),
						LastName: $("input#lname").val(),
					});
					myForm.submit();
					myForm.onSuccess(function () {
						return false;
					});
				}
			});
		}
	});
</script>

 

 

 

 


Mike Sutton
Marketing Operations | DNSFilter.com
1 ACCEPTED SOLUTION

Accepted Solutions
msutton
Level 2

Re: Background form submits (sometimes) don't work.

I think I got this figured out.

 

$ host app-xx99.marketo.com
app-xx99.marketo.com is an alias for xx99.mktoedge.com.

 

Firefox can resolve this and with standard enhanced tracking protection enabled, blocks this as a tracking domain. None of the Chrome ad blockers block it yet, but could at some point.

 

I am not looking for a way around it. But maybe it helps if anyone runs into this issue in the future.


Mike Sutton
Marketing Operations | DNSFilter.com

View solution in original post

5 REPLIES 5
msutton
Level 2

Re: Background form submits (sometimes) don't work.

I think I got this figured out.

 

$ host app-xx99.marketo.com
app-xx99.marketo.com is an alias for xx99.mktoedge.com.

 

Firefox can resolve this and with standard enhanced tracking protection enabled, blocks this as a tracking domain. None of the Chrome ad blockers block it yet, but could at some point.

 

I am not looking for a way around it. But maybe it helps if anyone runs into this issue in the future.


Mike Sutton
Marketing Operations | DNSFilter.com
SanfordWhiteman
Level 10 - Community Moderator

Re: Background form submits (sometimes) don't work.

Right, you must always load embedded forms from your LP domain, not *.marketo.com, because of Tracking Protection. This is quite well established and there are multiple Products blog posts about it!
TonyM
Level 2

Re: Background form submits (sometimes) don't work.

@SanfordWhiteman I have the exact same setup and cannot reproduce the issue on Firefox or on Chrome with adblockers. Enhanced tracking protection on Firefox is enabled and forms still submit (background submission). No console errors, hidden fields on the embedded Mkto form are rendered and the custom form submits successfully. I expected it to fail based on this and a bunch of other posts I've looked at.

 

My initial goal was to try get an onFailure event or something similar fired when form submission fails (for whatever reason, not just network failure). I saw your post that coversonSubmitError and will implement it. Then I ended up here.  

 

This is on an external website. 

SanfordWhiteman
Level 10 - Community Moderator

Re: Background form submits (sometimes) don't work.


Enhanced tracking protection on Firefox is enabled and forms still submit (background submission). No console errors, hidden fields on the embedded Mkto form are rendered and the custom form submits successfully. I expected it to fail based on this and a bunch of other posts I've looked at.

It’s possible that app-*.marketo.com is exempted from the TP list at this time (since it’s not actually a tracker, it was just collateral damage). I haven’t retested in some time but the futureproof solution is to use a non-Marketo domain.

TonyM
Level 2

Re: Background form submits (sometimes) don't work.

Makes sense, thank you for the prompt reply.