Optimise
This commit is contained in:
parent
9179acd4cd
commit
2c613dc0d1
14 changed files with 376 additions and 188 deletions
|
|
@ -1,5 +1,6 @@
|
|||
const DOMAIN = 'narrowit.schmelczer.dev';
|
||||
const ENDPOINT = '/status';
|
||||
const IS_DEV = process.env.NODE_ENV !== 'production';
|
||||
|
||||
type EventOptions = {
|
||||
props?: Record<string, string | number | boolean>;
|
||||
|
|
@ -7,6 +8,8 @@ type EventOptions = {
|
|||
};
|
||||
|
||||
function sendEvent(name: string, options?: EventOptions) {
|
||||
if (IS_DEV) return;
|
||||
|
||||
const payload: Record<string, unknown> = {
|
||||
n: name,
|
||||
u: window.location.href,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue