Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent max session time between Analytics V2 and react native #997

Closed
lennartschoch opened this issue Sep 10, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@lennartschoch
Copy link

Hey there!

We're using Segment to integrate with Amplitude (through the Amplitude Actions destination) in both our web app (using Analytics V2) and React Native App. While working on a bug ticket, I took a look at your implementation of the Segment plugin that handles the session ID both on JS and on RN and I noticed that the implementations seem to differ quite a bit. Mainly, in Analytics V2, the sessions are limited to 30 minutes (and are kept longer as long as the user keeps sending events) while on RN, there is a hardcoded 5 min limit in the plugin:

const MAX_SESSION_TIME_IN_MS = 300000;

Just wanted to check in if this is intentional or if this is a bug?

Thanks!

@lennartschoch lennartschoch added the bug Something isn't working label Sep 10, 2024
@lennartschoch lennartschoch changed the title Inconsistent max session time between web and react native Inconsistent max session time between Analytics V2 and react native Sep 10, 2024
@alanjcharles
Copy link
Contributor

Hi @lennartschoch thank you for bringing this to our attention- I will take a look over the next sprint

@alanjcharles
Copy link
Contributor

Hi @lennartschoch so, our analytics-react-native-plugin-amplitude is in line with our other mobile offerings, rather than the web sdk, as typically react native architecture is more similar to other mobile architectures than it is to web. Please refer to this Swift PR for more information segment-integrations/analytics-swift-amplitude#21

With that in mind, is the hard-coded value not working for you as in its leading to lost data or inconsistent reporting downstream? I'm not against updating this to work as you would expect, I just need to make sure it's in line with existing implementations and/or expectations on the Amplitude side. Please just let me know and we can go from there. Thanks!

@alanjcharles
Copy link
Contributor

if you need any additional support please reach out the [email protected] thanks!

@lennartschoch
Copy link
Author

Thanks a lot for the reply @alanjcharles and sorry for my delay in getting back to you. I was mainly wondering if this discrepancy was intentional, your explanation makes perfect sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants