spraakbanken / mink-frontend

Vue frontend for Mink
https://spraakbanken.gu.se/mink/
0 stars 0 forks source link

Matomo: use sendBeacon #165

Closed arildm closed 2 months ago

arildm commented 2 months ago

By using the 'alwaysUseSendBeacon' command, the tracking client will use the navigator.sendBeacon() method instead of XHR to post to the Matomo API. This works better in some cases, like outlinks. Some browsers or adblockers may block this method, but my impression is that it's not too many.

Matomo FAQ page: In JavaScript Tracker, how do I enable the use of navigator.sendBeacon()?

arildm commented 2 months ago

Beacon seems to be enabled automatically.