-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(insights): user-defined send/bindEvent overrides internal click (#…
…5527) * fix(insights): prevent duplicate events in sendEvent, we mark internal events (click and conversion), and prevent them being sent if there was a custom click right before. Note that this doesn't yet work with bindEvent, as it's higher in the bubbling tree * fix(internal): bail out of default click if element has a bindEvent parent * test * fix: only prevent next clicks after a regular click * bundlesize * test(infiniteHits): add sendEvent tests same idea as this test in hits-integration-test.ts * wip infinite hits * move bindEvent click listener people can't bind events higher anyway, so this is safe to do * refactor: move dedupe into middleware this allows the dedupe to work for both bindEvent and sendEvent in a single codebase. Tiny aside: this means that the "next internal click" is now global, meaning if you click on geo, then on hits, we'll see that as an internal click to prevent sending. This is an extreme edge case, as almost nowhere sends click events. * fix(events): move back inside connector this prevents a custom blocking an internal in a different widget * get rid of global cruft * refactor: use timers instead of order-based ignoring * test(common): insights clicks + view for hits + infinitehits * fix(react): send an internal event * PR feedback * internal
- Loading branch information
Showing
23 changed files
with
1,906 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.