Skip to content

Fix load timing with snowplow form tracking

What does this MR do?

It seems like snowplow can't bind form events as early as elements are findable. It seems like we have to wait until the "complete" readystate, instead of just "interactive" -- which seems wrong to me, but hey, I didn't write snowplow.

This attempts to fix a race condition for finding elements and then trying to enable form tracking on them. You can find the element, but snowplow won't bind events to them properly at that time, and so you have to wait.

There was also an issue with putting empty allow lists in the config passed to snowplow, and I've adjusted that to be friendlier as well.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Merge request reports