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.
13 lines
426 B
JavaScript
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 {}
|
|
}
|