diff --git a/services/web/frontend/js/infrastructure/event-tracking.js b/services/web/frontend/js/infrastructure/event-tracking.js index 3acff43638..a864769665 100644 --- a/services/web/frontend/js/infrastructure/event-tracking.js +++ b/services/web/frontend/js/infrastructure/event-tracking.js @@ -49,5 +49,10 @@ function sendBeacon(key, data) { const blob = new Blob([JSON.stringify(data)], { type: 'application/json; charset=UTF-8', }) - navigator.sendBeacon(`/event/${key}`, blob) + try { + navigator.sendBeacon(`/event/${key}`, blob) + } catch (error) { + // Ignored. There's a range of browser for which `navigator.sendBeacon` is available but + // will throw an error if it's called with an unacceptable mime-typed Blob as the data. + } }