feat: full site build — Project/Melody schema (Option A), admin CRUD, public sections, uploads, email+SMTP, internal analytics, legal pages, docs
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
export function trackClientEvent(input: { type: "PAGE_VIEW" | "PROJECT_OPEN" | "MELODY_PLAY" | "PROJECT_LINK_CLICK"; path?: string; entityId?: string }) {
|
||||
void fetch("/api/analytics", {
|
||||
method: "POST",
|
||||
headers: { "content-type": "application/json" },
|
||||
body: JSON.stringify({ ...input, path: input.path || window.location.pathname }),
|
||||
keepalive: true,
|
||||
}).catch(() => undefined);
|
||||
}
|
||||
Reference in New Issue
Block a user