client analytics improvement (dont console.log randomly)
This commit is contained in:
parent
79789265c8
commit
44020d24e4
1 changed files with 1 additions and 2 deletions
|
|
@ -27,13 +27,12 @@
|
||||||
|
|
||||||
const send = (type, data = {}) => {
|
const send = (type, data = {}) => {
|
||||||
(async () => {
|
(async () => {
|
||||||
const res = await fetch(API + "/some-cool-endpoint", {
|
await fetch(API + "/some-cool-endpoint", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify({ type, t: Date.now(), ...common, ...data }),
|
body: JSON.stringify({ type, t: Date.now(), ...common, ...data }),
|
||||||
keepalive: true,
|
keepalive: true,
|
||||||
});
|
});
|
||||||
console.log(res)
|
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue