cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RUM advanced setup question (Event handlers)

henk_stobbe
DynaMight Champion
DynaMight Champion

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

 

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

 

henk_stobbe_1-1664209337740.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 

 

 

1 REPLY 1

Rugiewit
Dynatrace Enthusiast
Dynatrace Enthusiast

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  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

Featured Posts