Repository navigation
Session Tracking
Every event now carries its analytics session at context.providers.metarouter.{sessionID, sessionCount} — the same path and shape as the web SDK's MetaRouter session, so pipeline mappings (e.g. GA4 session_id/session_number) read one field from every platform.
- Always on: sessions are minted lazily by the first event, extend on any activity (native, lifecycle, or webview-bridge events), and end after
sessionTimeoutMinutes(default 30) of inactivity. The window slides; sessions survive process restarts inside the window andreset(). InitOptions.sessionTimeoutMinutes(default 30, clamped-with-warning) andInitOptions.fireSessionStarted(default false) — enabling emits aSession Startedtrack event each time a new session is minted, for destinations that need an explicit session-start signal (GA4session_start).getSessionId() async -> String?on the analytics interface (nil before the first event; reads never start or extend a session);sessionId/sessionCountingetDebugInfo().
Backwards-compatible: events queued on disk by earlier versions decode unchanged; no event volume changes unless fireSessionStarted is enabled. E2E verified against a production-shape cluster (mint / restart-resume / rollover, payload audit).
Full Changelog: v1.6.0...v1.7.0