Records a user-defined analytics event. Events are queued and periodically flushed using navigator.sendBeacon() with a fetch keepalive fallback.
navigator.sendBeacon()
Optional
recordEvent("video_play", { id: "abc123", position: 0 });recordEvent("cta_click", { ctaId: "signup-hero" }); Copy
recordEvent("video_play", { id: "abc123", position: 0 });recordEvent("cta_click", { ctaId: "signup-hero" });
Records a user-defined analytics event. Events are queued and periodically flushed using
navigator.sendBeacon()
with a fetch keepalive fallback.