mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +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,
|
payload,
|
||||||
});
|
});
|
||||||
|
|
||||||
navigator.sendBeacon(`${root}/api/collect`, data);
|
fetch(`${root}/api/collect`, {
|
||||||
|
method: 'POST',
|
||||||
|
body: data,
|
||||||
|
keepalive: true,
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const addEvents = node => {
|
const addEvents = node => {
|
||||||
|
Loading…
Reference in New Issue
Block a user