Delay form submissions (Follow-up from "Resolve "Create a generic event listener for tracking clicks on GitLab.com"")
The following discussion from !7403 (merged) should be addressed:
-
@dennis started a discussion: (+2 comments) Another thought I had was that it's possible some events may not be properly tracked if, for example, they're tied to a form submit button.
It would be possible for the form submission to complete before the tracking event is successfully sent to Snowplow. In which case we would be missing out data dependent on the user's latency.
That said, if we do something like delaying form submission until the event is properly tracked, you might run into issues with ad blockers possibly preventing the Snowplow request from completing at all, which could get into another matter of whether these should be user opt-in or not...
/cc @jeremy_
When tracking data which gets submitted by a form, we need to make sure that the form gets submitted after the snowplow tracking has finished, otherwise we can't make sure that all relevant data is tracked.
The "opt-in" is out of scope for this issue and is covered in #7809 (moved)