Offline & Persistence
Tracked events and survey responses are persisted locally before being sent, and marked
synced once the network request succeeds — so a page reload or a dropped connection doesn’t
lose data mid-flight. flush() (web only — see Platform Parity) forces
a send of whatever’s currently pending, ahead of the periodic timer.
Web’s storage fallback
Web persists to IndexedDB. If IndexedDB is unavailable (private browsing in some browsers, storage quota exceeded, etc.), data is persisted locally and survives page reloads either way — you don’t need to branch on which storage mechanism is in use.
Event history retention
user.eventHistory (used by EVENT_FREQUENCY/EVENT_RECENCY/EVENT_ABSENCE trigger rules —
see How Triggering Works) is capped: 90-day retention, 100
timestamps per event name, 50 distinct event names tracked. Once a given event’s timestamp
list exceeds its cap, older entries are dropped.