mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Update tracker/index.js: SendBeacon() to Fetch API
This commit is contained in:
parent
f55ba7bd80
commit
a33293066e
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue