ReviewOS

stacks/ts-analytics

Bounce/entry undercount race (isNewSession computed before write)

#145
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Severity: High · Where: collect.ts:157; Analytics.ts:1805 isNewSession is evaluated once before the session row is written, so two sub-100ms pageviews both get isBounce/isUnique=true → double-counted entries. Fix: Derive newness atomically from the session upsert result (see the concurrency-safe session write issue).

Sign in to comment on this issue.