what is the difference between user and user with profiles. how do i create use with profile. currently in my mixpanel project user created dont have properties. what are we doing wrong. how do i fix it
Hi Akshay J., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
I'll explain the difference between users and user profiles in Mixpanel and how to create user profiles with properties.
Users vs. User Profiles
In Mixpanel, a user is identified by a distinct ID and can have events associated with them. However, a user can exist in Mixpanel without having a profile, especially when they're anonymous (not logged in).A user profile contains demographic attributes (user properties) about a user, such as name, email, or other characteristics. User profiles are optional and separate from events.
Why Your Users Don't Have Properties
If your users don't have properties, it's likely because: 1. You're tracking events with distinct IDs, but not creating or updating user profiles 2. You haven't called the appropriate profile methods in your implementation
How to Create User Profiles with Properties
To create user profiles with properties, you need to explicitly set profile properties using Mixpanel's SDK methods. Here's how to do it in various SDKs:
JavaScript
mixpanel.identify('12345');
mixpanel.people.set({
plan: 'Premium',
name: 'Sam',
email: 'sam@​[example.com](http://example.com)'
});LBKS```LBKS[Mixpanel SDKs: Javascript](https://docs.mixpanel.com/docs/tracking-methods/sdks/javascript#storing-user-profiles)
Python
initialize Mixpanel
mp = Mixpanel('YOUR_PROJECT_TOKEN')
create a user profile with name and email props
mp.people_set('sample_distinct_id', { 'name': 'sam', 'ignore_time': True, # do not update ip': 0}) # do not update geolocation```Mixpanel SDKs: Python
Other SDKs
Mixpanel provides similar methods for other languages like Ruby, PHP, iOS, Android, etc. The pattern is similar - you need to call a specific profile method after identifying the user.
Important Notes
1. Distinct ID Consistency: Make sure you use the same distinct ID for both events and user profiles for the same user.2. Identify First: For client-side SDKs (JavaScript, iOS, Android), you must call identify()
before setting profile properties.3. Profile Updates: User profiles are mutable, meaning you can update them at any time, and they'll join retroactively with all past events that have the same distinct ID.4. Best Practices: It's recommended to use user properties primarily for demographic attributes like name, email, and domain, while tracking most other data as event properties.If you're using a third-party integration like Segment, make sure you're calling the appropriate identify methods there as well.User Profile: Demographic attributes for your users
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.