Skip to content

Conversation

antgonzales
Copy link

@antgonzales antgonzales commented Sep 3, 2025

Adds attribute-only opt-out for frustration classification using data-dd-click-ignore on clicked elements and ancestors (including Shadow DOM).

Fixes #3621.

Here's the output of the test suite when I run it locally:

~/code/browser-sdk feat/click-ignore-frustration*
❯ npm run test

> test
> yarn test:unit:watch

...

219 assets
2533 modules
webpack 5.101.0 compiled successfully in 7104 ms
02 09 2025 23:01:41.612:WARN [karma]: No captured browser, open http://localhost:9876/
02 09 2025 23:01:41.631:INFO [karma-server]: Karma v6.4.4 server started at http://localhost:9876/
02 09 2025 23:01:41.632:INFO [launcher]: Launching browsers ChromeHeadlessNoSandbox with concurrency unlimited
02 09 2025 23:01:41.634:INFO [launcher]: Starting browser ChromeHeadless
02 09 2025 23:01:42.711:INFO [Chrome Headless 139.0.0.0 (Mac OS 10.15.7)]: Connected on socket esFiyOkr2z-ayl-2AAAB with id 88912216
02 09 2025 23:01:57.041:INFO [jasmine-seed-reporter]: Chrome Headless 139.0.0.0 (Mac OS 10.15.7): Randomized with seed 73747

TOTAL: 2843 SUCCESS

=============================== Coverage summary ===============================
Statements   : 92.48% ( 6373/6891 )
Branches     : 88.26% ( 3860/4373 )
Functions    : 91.51% ( 1909/2086 )
Lines        : 92.6% ( 6203/6698 )
================================================================================

Chrome Headless 139.0.0.0 (Mac OS 10.15.7): Executed 2843 of 2844 (skipped 1) SUCCESS (13.652 secs / 13.39 secs)
TOTAL: 2843 SUCCESS

…als\n\n- Add clickIgnore utility (bitmask) to parse across ancestors (incl. Shadow DOM)\n- Wire into computeFrustration: suppress rage/dead/error classifications based on tokens\n- Add unit tests for suppression, ancestor inheritance, , and parsing robustness\n- Add plan doc with scope and examples (docs/plan-click-ignore-frustration.md)\n\nNotes:\n- Only frustration types are suppressed; click actions and counts still collect\n- Performance: ancestor walk cached per element via WeakMap\n- CI will validate full suite; local Karma runner isn’t available in this sandbox
@antgonzales antgonzales requested a review from a team as a code owner September 3, 2025 05:54
@antgonzales
Copy link
Author

@BenoitZugmeyer @mormubis @thomas-lebeau Could you please take a look and give me feedback on this idea? Thank you!

@bcaudan
Copy link
Collaborator

bcaudan commented Sep 8, 2025

Hi @antgonzales, thanks for your contribution!
We'll take over your PR and let you know when it will be available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💡 Allow developers to tag elements to ignore "Rage Clicks"

2 participants