mirror of
https://github.com/kremalicious/umami.git
synced 2025-01-26 18:21:10 +01:00
Merge pull request #1163 from rohandebsarkar/fetch-api
Update `tracker/index.js`: `SendBeacon()` to `Fetch API`
This commit is contained in:
commit
4bddf37921
@ -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