Skip to main content
Answer

Mixpanel user loses City and Region data when linked to RevenueCat

  • August 26, 2025
  • 2 replies
  • 57 views

Forum|alt.badge.img+5

When linking RevenueCat to Mixpanel in iOS, the Mixpanel user City and Region fields become empty. I see reference to this in a prior post but no solution. This is the code I am using:

Mixpanel.mainInstance().identify(distinctId: Purchases.shared.appUserID)

 

Best answer by hussain

Hi,

Thanks for reaching out. I’m happy to help.

When you link Mixpanel to RevenueCat and call identify() with the RevenueCat appUserID, Mixpanel can create/merge a new identified profile. Geolocation fields like $city and $region live on the profile and are not preserved from an anonymous profile after identity merge and are only (re)populated when Mixpanel receives data that can set them (usually a client event or a profile update from the device). That’s why they can appear empty right after linking.

I’d recommend to trigger a lightweight profile update from the device after calling identify() 

Mixpanel.mainInstance().people.set(property: "last_seen",
to: ISO8601DateFormatter().string(from: Date()))

Profile geolocation will be derived when you update profile properties.

Hope this helps, let me know if you have any other questions.

Best,

Hussain

This post has been closed for comments

2 replies

hussain
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • Answer
  • August 28, 2025

Hi,

Thanks for reaching out. I’m happy to help.

When you link Mixpanel to RevenueCat and call identify() with the RevenueCat appUserID, Mixpanel can create/merge a new identified profile. Geolocation fields like $city and $region live on the profile and are not preserved from an anonymous profile after identity merge and are only (re)populated when Mixpanel receives data that can set them (usually a client event or a profile update from the device). That’s why they can appear empty right after linking.

I’d recommend to trigger a lightweight profile update from the device after calling identify() 

Mixpanel.mainInstance().people.set(property: "last_seen",
to: ISO8601DateFormatter().string(from: Date()))

Profile geolocation will be derived when you update profile properties.

Hope this helps, let me know if you have any other questions.

Best,

Hussain


Forum|alt.badge.img+5
  • Author
  • Active Member
  • August 28, 2025

Thanks, this seemed to work!