mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 19:35:06 +03:00
* fix: resolve 50% session tracking discrepancy on root route - Fixes race condition causing ~50% discrepancy in session tracking between client and server on root route - Implements event queuing to capture telemetry events before PostHog initializes - Adds session ID correlation to enable unified tracking analysis between client and server events - Uses sendBeacon API for both pageview and pageleave events to ensure reliable capture even during navigation - Adds production safeguards with try/catch blocks and memory caps to prevent API errors from breaking tracking * refactor(posthog-client): reduce max pending events and improve event handling - Decreased the maximum number of queued events from 200 to 20 - Added the use of the sendBeacon API for pending events to survive page unload - Added comments to clarify the handling of pending properties and events during posthog initialization