Forms - not detecting submit on multistep forms?

Hi,

We are tracking form submit and input interactions with Forms premium plugin. We are tracking about 10 forms without any issues, we just added them, targetting forms by their ID attr.

We’re encoutering an odd behavior on only one form. The ID is correct, but the tracking information are not going to the Forms dashboard.

What I did so far to check everything is right:

  • double checked the id attribute
  • used the debug panel to check that mtm.FormSubmit event is fired and that the dataLayer at this point contains my form ID (it does)

The thing is, this form is a multi-step form: we’re using React SPA, so the form inner DOM contains different inputs on each step (fields of others steps are not in the DOM, they are not just hidden using CSS), each step contains a button (type button), but only the last step contains a button (type submit). This is my only guess why this form doesn’t show up in in the dashboard.

Any ideas?

1 Like

Hello @enguerranweiss-if. Likely your form does not have a submit button or the form submit event is not triggered in your website. To record a form submit manually, can you please call a method _paq.push(['FormAnalytics::trackFormSubmit', formOrFieldElement]); whenever your form is being submitted. formOrFieldElement can be either the form element itself or any element within your form.

This is what I don’t understand. This form has a button (type submit) and the submit event is triggered (as we listen for it in our app). But it only have this button on the last step. Besides, when I submit it, I see in the debugging panel that Matomo is sending the event mtm.FormSubmit.

Hi @enguerranweiss-if ,

Can you confirm that whether you had a chance to review this FAQ https://matomo.org/faq/form-analytics/how-do-i-track-a-multi-page-form-using-form-analytics/.

I indeed reviewed this page. This is why I don’t understand.

Hi @enguerranweiss-if ,

Can you please get in touch with our support team at shop@matomo.org