Skip to main content
Solved

For how long does the user stay identified? (React Native SDK)

  • July 8, 2023
  • 1 reply
  • 305 views

I have a mobile app in React Native. I setUserId when user logs in or registers. I understand that during this session all sent events are personalized. But when user closes the app and opens it in 2 days, he does not need to login, so I do not setUserId manually. But amplitude session is new. I send events in new session. Are these events pesonalized? If yes, how does it happen? Is this data stored on client’s side? If yes, for how long is it stored there?

Best answer by Saish Redkar

Hi @Dzmitry Seuruk 

If the user is logged in and starts a new session on the same device, all their events will be attributed to their user id set in their first session and clubbed under a whole new session.

The following articles will help you better understand the nuances of how Amplitude tracks and identifies unique users across different scenarios

The internal workings are handled by the SDK here. Per the docs, when the SDK is run on web, the identity is stored in the browser cookie by default, whereas on native platforms the identity is stored in async storage. The SDK gives you the option to reset the user id if needed after a user logs out.

Hope this helps.

View original
Did this topic help you find an answer to your question?

1 reply

Saish Redkar
Expert
Forum|alt.badge.img+10
  • Expert
  • 1377 replies
  • Answer
  • July 10, 2023

Hi @Dzmitry Seuruk 

If the user is logged in and starts a new session on the same device, all their events will be attributed to their user id set in their first session and clubbed under a whole new session.

The following articles will help you better understand the nuances of how Amplitude tracks and identifies unique users across different scenarios

The internal workings are handled by the SDK here. Per the docs, when the SDK is run on web, the identity is stored in the browser cookie by default, whereas on native platforms the identity is stored in async storage. The SDK gives you the option to reset the user id if needed after a user logs out.

Hope this helps.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings