Unbounce and Mouseflow

Hi All,

I am struggling getting Mouseflow to accurately record form submits on my Unbounce LPs. Part of the problem is I do not know how the form submit action is handled in Unbounce.

Can someone help me understand how the submit action takes place in unbounce?

Hey there Dan!

Unbounce forms are submitted via an AJAX POST request, so Mouseflow won’t be able to detect the submissions unfortunately.

That said, I took a look through Mouseflow’s documentation and found a workaround that may work! Instead of having Mouseflow detect form submissions, you can tell them when a form is successfully submitted :slight_smile:

Here is a script you can use to do this:

<script>
  window.ub.hooks.afterFormSubmit.push(function() {
    window._mfq = window._mfq || [];
    window._mfq.push(['formSubmitSuccess', '#formID']);
  });
</script>

#formID will need to be replaced with the ID of your form. This ID will differ from page to page, and it can be found in the Unbounce Builder like this:

For reference, here are some resources I used to create the script above:

I hope this leads you in the right direction, Dan! Let me know if you have any questions :slight_smile:

Cheers,

Becky

2 Likes