Skip to content

Batching and delivery

  • Listeners buffer events on the page. Every 250 ms they are handed to the uploader, a Web Worker when possible.
  • Every 2 s, or as soon as 2,000 events are queued, the uploader cuts a batch, compresses it with raw DEFLATE and posts it.
  • A batch keeps its batch_id across retries; the API answers a repeated id with duplicate: true and does not store it twice.
  • Failed uploads back off exponentially, 1 s doubling to 30 s. At most 30 batches wait; older ones are dropped and reported.
  • On a 404 (unknown or erased session) the uploader opens a new session and resends.
  • When the page is hidden or unloads, the SDK flushes; anything left goes out through navigator.sendBeacon as plain JSON.
  • Expect 250 to 700 events per active minute, sent at 15 to 25 % of the raw JSON size. Idle pages send nothing.