Form submit tracking stopped working | Community
Skip to main content
New Participant
August 29, 2023
Solved

Form submit tracking stopped working

  • August 29, 2023
  • 1 reply
  • 488 views

Form submit tracking stopped working after moving to a single-page application. How to handle this? This is the CSS selector that we use in the core submit type event in launch rule  "#atomic-submit" Any custom code to listen to form submit?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jennifer_Dungan

This all depends on how the form was coded... 

 

In most cases, SPAs shouldn't break the default form behaviour.. that said, a lot of developers have started throwing in code that breaks that action (in lieu of their own custom code)... in that case it's very hard to deal with.

 

The first step I would suggest would be to work with your developers... see why they disabled the default "form submit" action... is there a legitimate reason? Can it be re-enabled without breaking something, etc...

 

If they can't re-enable that, then maybe you can have them trigger a custom JS event that you can use a custom code "event listener" to create your trigger.

 

Without seeing the implementation I can really only give generic solutions at this time.

1 reply

Jennifer_Dungan
Jennifer_DunganAccepted solution
New Participant
August 29, 2023

This all depends on how the form was coded... 

 

In most cases, SPAs shouldn't break the default form behaviour.. that said, a lot of developers have started throwing in code that breaks that action (in lieu of their own custom code)... in that case it's very hard to deal with.

 

The first step I would suggest would be to work with your developers... see why they disabled the default "form submit" action... is there a legitimate reason? Can it be re-enabled without breaking something, etc...

 

If they can't re-enable that, then maybe you can have them trigger a custom JS event that you can use a custom code "event listener" to create your trigger.

 

Without seeing the implementation I can really only give generic solutions at this time.