How to send analytics data to the server before the user leaves using JavaScript
Originally posted here!
Photo by
Luke Chesser
Often we may need to send some analytics to the server before a user leaves a webpage. So the first thing that comes to your mind would be to use fetch or XHR (XML Http Request) API befor...
melvingeorge-me.hashnode.dev3 min read