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?
Hi
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!
Hi
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!
Hi
Yeah that is the correct way to do it.
Let me know if you have questions!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.