mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 17:15:37 +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
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue