We've been seeing decent number of our free trial leads NOT appearing in our marketo instance. They come through a marketo form embedded on this page: https://im.tapclicks.com/signup.php. We're able to see them on the back end in our trial manager, but a few of them per day do not show up in Marketo. We've been able to determine that all of the 6-7 that we've looked into are using Apple/iOS devices.
Has anyone seen anything like this in similar cases? Any known fixes?
Hey Adam, how are you syncing data to both Marketo and your product trial manager through this form?
It is unusual that a Marketo form would submit successfully but not have data end up in Marketo. I would probably escalate this to support but am just curious what non-standard things may be happening on the back-end of the form as that is something support will ask you too.
They're using a 2-phase form submission (once to their PHP back end, and then to Marketo) but the calls aren't chained correctly.
Your code has a glaring race condition.
Form submission is asynchronous. Location manipulation is synchronous (it will change immediately after the code block exits). There is no reason to expect form submission to complete before the browser navigates away from the page. It's a total crapshoot, if everything else is the same, the fact that you're seeing this on mobile devices is merely a matter of comparative local/network performance.
You want the window.location.replace() to happen in the form's onSuccess listener, which is guaranteed to fire after a successful asynchronous form submit.
The Facebook tag is also async and suffers from the same problem. This is basic async programming: you need to chain your functions together using event listeners.