Send analytics with navigator.sendBeacon() without blocking the page
A common problem when sending statistical (analytics) data to the server from the frontend is that when using AJAX, you often end up blocking the page load. Fortunately, there’s a native solution.