# RUM advanced setup question (Event handlers)

**URL:** <https://community.dynatrace.com/t/rum-advanced-setup-question-event-handlers/36660>\
**Category:** Real User Monitoring\
**Tags:** real-user-monitoring-classic, user-actions\
**Created:** [September 26, 2022, 4:29pm UTC](https://community.dynatrace.com/t/rum-advanced-setup-question-event-handlers/36660 "2022-09-26T16:29:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [September 26, 2022, 4:29pm UTC](https://community.dynatrace.com/t/rum-advanced-setup-question-event-handlers/36660/1 "2022-09-26T16:29:12Z")

</div>

Hello,

Reading the documentation, the below switches can be used by missing user actions to instruct the Dynatrace JavaScript to put an “extra” handler on an HTML element. So adding an event attribute on an element.

 ![henk_stobbe_0-1664208884301.png](https://global.discourse-cdn.com/dynatrace/original/2X/d/d8454dead3bae128aa120409ff48ab47d679cbb6.png)

So far so good but now, we can also do below.

 ![henk_stobbe_1-1664209337740.png](https://global.discourse-cdn.com/dynatrace/original/2X/b/bcc49d208798efe57acc976d8cd2fb93e9bd3d75.png)

So this wraps around the addEventListeners and attachEvent set by other javascripts?

And what is the difference between “event capture” and “global event capture” (both contain “Click”)?

Who can explain above to me?

KR Henk

---

<div class="post-metadata">

**Author:** ![DarkoA](https://avatars.discourse-cdn.com/v4/letter/d/e8c25b/32.png) [@DarkoA](https://community.dynatrace.com/u/DarkoA)\
**Post date:** [January 12, 2023, 1:03pm UTC](https://community.dynatrace.com/t/rum-advanced-setup-question-event-handlers/36660/2 "2023-01-12T13:03:25Z")

</div>

Hey there

I reached out to some colleagues internally to get an idea behind this.  
Global event capture registers a new listener on the “document” object of the page to capture fired events.

The addEventListener Module above that was created walks through the DOM and registers the listeners directly on specific events (instead of registering 1 listener on the&nbsp; document itself, adds all the listeners on buttons, inputs elements, etc)

The addEventListener methodology takes more setup and memory to perform BUT was implemented due to clients & customers having unique javascript functionality, security setup, or some framework that would prevent the encapsulation of the entire document object to add 1 listener. Because of that, user actions sometimes didn’t get registered or appear in their user session. (Note from my understanding this is a very rare occurrence)

regards,  
Darko
