Files
archy/docker/justworks/business/public/assets/general-analytics.js
T
yaya 94899e69d3 feat: integrate Just Works app and native business setup
Preserve hosted website UX inside Archipelago, add isolated Business and owner-authorized native wallet setup, and include deployment handoff. Based on main with native signer import already accepted.
2026-10-08 19:39:38 +01:00

13 lines
426 B
JavaScript

const endpoint = "https://justworks.cash/api/analytics/event";
export function trackGallery(type = "surface_interaction", action = "open") {
try {
const body = JSON.stringify({ surface: "gallery", type, action });
if (
navigator.sendBeacon?.(endpoint, new Blob([body], { type: "text/plain" }))
)
return;
fetch(endpoint, { method: "POST", body, keepalive: true }).catch(() => {});
} catch {}
}