Skip to main content
Solved

Understanding RevenueCat's Use of Anonymous IDs Without Internet Connection


Forum|alt.badge.img+2

Hello RevenueCat Community,

I've encountered a scenario in my app where RevenueCat seems to be assigning an anonymous ID to the user even when I have previously configured the SDK with a specific appUserID. This behavior appears to manifest when there's no internet connection available.

From my understanding, once a user is assigned a specific appUserID, RevenueCat should use this ID for any future interactions, including syncing purchase information or entitlements. However, in offline scenarios, it seems to revert to using an anonymous ID, which I find perplexing.

Could someone clarify under what conditions RevenueCat opts to use an anonymous ID instead of the appUserID provided during SDK configuration? Additionally, are there best practices or considerations we should be aware of to ensure consistent user identification, especially in offline scenarios or during network interruptions?

I can handle network issue, and ask the user to turn on the network, but it’s different for the issue when trying to logout with an anonymous user.

Thank you in advance for your guidance!

 

 

Best answer by Ryan Glanz

Hi!

Yes, we do have guidance for only using custom IDs. What could be happening is that you’re calling logout() somewhere, or your restore behavior is set to ‘transfer’ rather than ‘keep with original user id’

View original
Did this post help you find an answer to your question?
This post has been closed for comments

2 replies

Ryan Glanz
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 383 replies
  • Answer
  • February 28, 2024

Hi!

Yes, we do have guidance for only using custom IDs. What could be happening is that you’re calling logout() somewhere, or your restore behavior is set to ‘transfer’ rather than ‘keep with original user id’


Forum|alt.badge.img+2
  • Author
  • New Member
  • 1 reply
  • March 1, 2024
Ryan Glanz wrote:

Hi!

Yes, we do have guidance for only using custom IDs. What could be happening is that you’re calling logout() somewhere, or your restore behavior is set to ‘transfer’ rather than ‘keep with original user id’

Thank you for your quick answer. It was a possible reason, but instead of trying to logout with revenue cat and display a message if there’s an error, I decided to logout everytime (it’s best for the user experience). It’s working fine 🙂 Sorry for the noise, it’s my first time implementing this on my app so I’m trying things.

 

Thanks again for your help !


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