Skip to main content
Solved

"Don't set emails as App User IDs"

  • January 21, 2025
  • 4 replies
  • 66 views

Forum|alt.badge.img+3

So, I am following the recommendation to “Don’t set emails as App User IDs” in:

https://www.revenuecat.com/docs/customers/identifying-customers#tips-for-setting-custom-app-user-ids

and instead am setting the App User ID to their UID. But this means in my RevenueCat dashboard, the users are identified by strings like “McXAayHL1qVtFLSm74phQAqZNGx1”.

Is there a way to follow your recommendation but still display users via their email in the dashboard? 

Best answer by joan-cardona

Hi ​@philip-johnson-4e5f09,

Yeah that is the correct way to do it.

Let me know if you have questions!

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

4 replies

joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 371 replies
  • January 23, 2025

Hi ​@philip-johnson-4e5f09,

There’s no way to have the emails shown in the dashboard but you can set the email as a custom attribute. Then you’ll see the email in the customer’s history screen and you’d be able to search for a user given an email in the Customers tab.

Let me know if that works!

 


Forum|alt.badge.img+3

Hi ​@joan-cardona 

I looked at the custom attribute documentation, and found the following section:

https://www.revenuecat.com/docs/customers/customer-attributes#reserved-attributes

Scrolling down, I found this:

Reserved attributes can be written directly by setting the key (don't forget the $ prefix) or with special helper methods:

(Flutter) Purchases.setEmail("test@example.com")

So am I correct in assuming that I could have an initialize method like this:
 

Future<void> initialize(String appUserUID, String email) async {
    if (!configured) {
      await Purchases.setLogLevel(LogLevel.debug);
      PurchasesConfiguration configuration =
          PurchasesConfiguration(StoreConfig.instance.apiKey)
            ..appUserID = appUserUID
            ..purchasesAreCompletedBy =
                const PurchasesAreCompletedByRevenueCat();
      await Purchases.configure(configuration);
      await Purchases.setEmail(email);
      configured = true;
    }
  }

Thanks for your help!


Forum|alt.badge.img+3

@joan-cardona bumping this. Is that use of setEmail appropriate? 


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 371 replies
  • Answer
  • January 26, 2025

Hi ​@philip-johnson-4e5f09,

Yeah that is the correct way to do it.

Let me know if you have questions!


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