Beforeunload and unload events are not triggering

Hi guys!

I am using these codes within our Freshdesk custom app to track user interactions and page exits.

window.addEventListener(“beforeunload”, () => )
window.addEventListener(“unload”, () => )

These events were working perfectly in the past, but recently this is not getting executed as expected.

The issue we’re facing is that the ‘beforeunload’ and ‘unload’ events, which were reliably triggering our tracking code, have become inconsistent. This has led to gaps in our user engagement data.

Thank you.