analytics-next icon indicating copy to clipboard operation
analytics-next copied to clipboard

Batching does not work after tab switch

Open pamela-encora opened this issue 2 years ago • 2 comments

I noticed that the batching of events stopped to work when a tab switch occurs in the browser. I think it's because of the pageUnloaded flag that is not being reset to false after onPageLeave is called. So, the logic here will be true, and the flush will be called instead of scheduleFlush

pamela-encora avatar Feb 08 '23 20:02 pamela-encora

Bump. This is affecting our production install of segment. Is this being looked at at all?

ericbambach-qwickrate avatar Jul 31 '23 18:07 ericbambach-qwickrate

Hey guys! Update: a PR is up for review https://github.com/segmentio/analytics-next/pull/915

I expect the fix to be merged in / published some time this week.

silesky avatar Aug 01 '23 04:08 silesky