Solved

Dashboard user account appears to be doubled

  • 20 April 2023
  • 6 replies
  • 91 views

Badge +5

First off, I have read everything in this thread and was not able to resolve my issue.

My user count (both “Active Users” and “New Customers”) counts on the RevenueCat dashboard appear to be roughly double the actual count as I am tracking it internally within my app. 

I am using anonymous user IDs. My app is pretty basic and all I do is call Purchases.configure once on app launch -- my understanding is that this is where the unique customer is either created or retrieved but I’m not exactly clear on the logic here or how it happens.

Anyway I’m using React Native and so I call .configure() in the export default function App() { … } function. I have also added logs and searched my entire code base to confirm that this is the only call and that it only gets called once during usage of the app.

I don’t ever call reset(), identify(), or any other such RevenueCat methods. The only other calls to the RevenueCat SDK after a thorough scrub of my code base are Purchases.getOfferings, Purchases.getCustomerInfo, and Purchases.purchasePackage.

I’m new to both React Native and the RevenueCat SDK so maybe I’m missing something basic here but I can’t seem to find it. Any idea why my user count might be roughly double? Thanks!

icon

Best answer by Michael Fogel 1 May 2023, 18:32

View original

6 replies

Userlevel 4
Badge +6

Hey @asindhu ,

 

Every time configure is called without a defined user ID, an anonymous ID will be created. We have a document going over this in more detail which could be found here: https://www.revenuecat.com/docs/user-ids#what-is-a-customer-in-revenuecat

 

This might be hard to track down on why this is happening, but what could possibly be happening is that you're not aliasing these users, so each user that restores or redownloads the app is not being aliased with there old ID causing them to appear as two different users. For more information on this, I recommend looking into our document here: https://www.revenuecat.com/docs/restoring-purchases

Badge +5

Hi @Michael Fogel, thanks so much for your reply. Just want to make sure I understand what exactly is meant by your response:

Every time configure is called without a defined user ID, an anonymous ID will be created

 

Even though it’s not explicitly stated, my read of the documentation is that the first time configure() is called without a user ID, a new one is created. But it specifies that then, that anonymous user ID is cached on the device, so what I am assuming is that the next time the app is launched and configure() is called, the same cached ID is retrieved in that case. Am I wrong about that? As in, are you only supposed to call configure() once? 

In that case I have to make some sort of check myself and somehow retrieve that cached anonymous user ID, which I don’t see how to do from the docs.

My app is already published with a handful of paying customers and from my own tests I know that the paid subscription status does get tracked correctly across app launches, so I’m hoping that I’m not making some really basic error of fully resetting the anonymous customer ID on each launch, as that would be really problematic!

Anyway if you could clarify this for me that would be super helpful. Thanks again.

Userlevel 4
Badge +6

Even though it’s not explicitly stated, my read of the documentation is that the first time configure() is called without a user ID, a new one is created. But it specifies that then, that anonymous user ID is cached on the device, so what I am assuming is that the next time the app is launched and configure() is called, the same cached ID is retrieved in that case. Am I wrong about that? As in, are you only supposed to call configure() once? 

Correct, sorry for my wording there. Yes, you will only want to call configure once. After configuration, the same instance is shared throughout your app by accessing the .shared instance in the SDK. If you don't provide an App User ID when configuring the Purchases SDK, RevenueCat will generate a new random App User ID for you and cache it on the device. In the event that the user deletes and reinstalls the app, a new random App User ID will be generated. I mis-worded it previously, but that anon ID will be cached on the device, I was more referring to if you are accidentally calling configure more than once.

 

Hope this helps! 

 

Badge +5

Got it, thanks again Michael. Sorry but I just want to make 100% sure I understand because my wording was also not super precise -- you call Purchases.configure once per app launch and not once per customer lifecycle, correct? Meaning, the call to Purchases.configure will perform the logic needed to determine whether there is a cached user ID on the device or whether to create a new one, and this is all transparent to me as the user of the SDK? So, the intended use of the configure call is once, every time, on app startup, yes?

Or is it that every time you call Purchases.configure, a new anonymous ID is created no matter what, and I need to have some sort of check to retrieve a cached ID from somewhere else?

Userlevel 4
Badge +6

So, the intended use of the configure call is once, every time, on app startup, yes?

Correct! You should only configure Purchases once, usually early in your application lifecycle. After configuration, the same instance is shared throughout your app by accessing the .shared instance in the SDK.

Badge +5

Great, thanks so much for your help! Haven’t yet gotten to the bottom of the double-counted users but will keep digging with the above information.

Reply