mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 02:06:19 +01:00
Update tracker/index.js
: SendBeacon()
to Fetch API
This commit is contained in:
parent
f55ba7bd80
commit
a33293066e
@ -122,7 +122,11 @@ import { removeTrailingSlash } from '../lib/url';
|
||||
payload,
|
||||
});
|
||||
|
||||
navigator.sendBeacon(`${root}/api/collect`, data);
|
||||
fetch(`${root}/api/collect`, {
|
||||
method: 'POST',
|
||||
body: data,
|
||||
keepalive: true,
|
||||
});
|
||||
};
|
||||
|
||||
const addEvents = node => {
|
||||
|
Loading…
Reference in New Issue
Block a user