mirror of
https://github.com/SrIzan10/analytics.srizan.ml.git
synced 2026-05-01 10:35:15 +00:00
Update tracker/index.js: SendBeacon() to Fetch API
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user