segmentio / analytics-react-native

The hassle-free way to add analytics to your React-Native app.
https://segment.com/docs/sources/mobile/react-native/
MIT License
360 stars 185 forks source link

fix(async-storage-persistor): Correctly import AsyncStorage #820

Closed krizzu closed 1 year ago

krizzu commented 1 year ago

We recently discovered that our Application Install events are rising exponentially. Turns out the store context was not correctly persisted, due to the wrong import on the CommonJS module of AsyncStorage.

Also, I think it'd be great to also mention in docs that users need to use store persistor so that some context events are not repeated on every App start. It's easy to miss in docs and Segment does not provide a default implementation out of the box already set up.

ltazmin commented 1 year ago

+1, we also started seeing this problem. Nice catch @krizzu.

servercimen commented 1 year ago

@oscb Is the sovran version 1.0.3 supposed to be available from npm? The latest version I see on the registry is 1.0.2 https://www.npmjs.com/package/@segment/sovran-react-native?activeTab=readme

efstathiosntonas commented 1 year ago

Our events have sky rocketed: Screenshot 2023-05-23 at 10 52 43 Screenshot 2023-05-23 at 10 52 22

niallzato commented 1 year ago

@efstathiosntonas can you please write into friends@segment.com, so our support team can investigate the issue with your MTUs? Thank you!

efstathiosntonas commented 1 year ago

@niallzato thanks, we’re already in an ongoing investigation with segment