You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 28, 2022. It is now read-only.
If a form submit event has been prevented by some other code (e.g., because client-side field validation failed), Segment's trackForm will still call submit and essentially override the prevention. As a result, the form will be POSTed and the track calls will be executed even though the action didn't really happen.
I rolled my own version for now which checks event.isDefaultPrevented() and if it's true will bail out before submitting the form or calling track.
I realize this might not be the result everyone wants, just thought I'd raise the issue.
Note: KISSMetrics' trackSubmit is in between--if the event has been prevented, it won't submit the form, but it will track the event (causing event inflation). I think this is because they're not calling prevent but just inserting a delay.
jonhilmarg, aleksei-a-savitski, izolate, joshuafleck and vxsx