I have a requirement in which we would like to fire a rule whenever user closes the window. Also, Is there any way if we can listen for other window events which happen on our site through DTM, such as window close, session inactivity et cetra. I understand, we can make use of direct call rule, triggered from the code base itself, but I am looking for a solution which can be implemented solely on DTM.
However, we have used event listeners on the website's code base and when ever any event occurs, we listen for this event in the custom JS file (included within page) and trigger direct call rule from this JS.
Yes, Let's say, we want to track an event when user closes the window. We can use this using 'onbeforeunload' window function. I was wondering how can we use this event with custom event type from Others section?
Yes, the "custom" line listed under the "Other" section of the drop down list will allow you to write your own event handler. I don't believe we have a reference for each of the event handlers that are built into DTM. Is there a particular event handler that you had questions about?