How to create user profiles on Mixpanel
User profiles in Mixpanel are created by sending identify calls with user properties through the SDK or API. Once identified, users can be tracked across sessions and enriched with custom properties for better analytics and targeting.
Prerequisites
- Active Mixpanel account
- Admin or project member access
- Basic understanding of user identification
- SDK integration or API access
Step-by-Step Instructions
Set up user identification in your code
mixpanel.identify('unique_user_id') in your application. This creates a link between anonymous events and a specific user. Use a unique, persistent identifier like user ID, email, or UUID. For web applications, add this call after user login or registration:mixpanel.identify('user123');
mixpanel.people.set({
'$email': 'user@example.com',
'$name': 'John Doe'
});Add user properties using people.set()
mixpanel.people.set(). Include both Mixpanel's default properties (prefixed with $) and custom properties:mixpanel.people.set({
'$email': 'user@example.com',
'$name': 'John Doe',
'$phone': '+1234567890',
'subscription_plan': 'premium',
'signup_date': '2026-03-18'
});This information appears in the Users section of your Mixpanel project.
Verify profile creation in Mixpanel dashboard
Set up incremental and list properties
mixpanel.people.increment() for numeric properties that change over time, and mixpanel.people.append() for list properties:// Increment login count
mixpanel.people.increment('login_count', 1);
// Add to favorite categories
mixpanel.people.append('favorite_categories', 'electronics');These methods automatically update existing profiles without overwriting other properties.
Configure profile property updates
mixpanel.people.set_once() for properties that should only be set once (like signup source) and mixpanel.people.union() to merge list values:// Set only if not already set
mixpanel.people.set_once({
'first_login_date': new Date().toISOString(),
'signup_source': 'google_ads'
});
// Merge arrays without duplicates
mixpanel.people.union({'skills': ['javascript', 'python']});Implement alias for anonymous users
mixpanel.alias(). Call this method when a user signs up or logs in for the first time:// Before user registers (anonymous)
mixpanel.track('View Product');
// When user registers
mixpanel.alias('user123');
mixpanel.identify('user123');This ensures pre-registration events are attributed to the final user profile.
Test and validate profile data
Common Issues & Troubleshooting
User profiles not appearing in dashboard
Ensure you're calling mixpanel.identify() before mixpanel.people.set(). Check that your project token is correct and verify network connectivity. Profile data may take up to 10 minutes to appear in the dashboard.
Duplicate user profiles created
This usually occurs from calling mixpanel.alias() multiple times or using inconsistent user IDs. Use the same unique identifier consistently and only call alias() once per user during their first identification.
Properties not updating correctly
Verify you're using the correct property update method (set, set_once, increment, etc.). Check that property names don't contain special characters and ensure the user is properly identified before setting properties.
Anonymous events not linking to identified users
Call mixpanel.alias() before mixpanel.identify() when transitioning from anonymous to identified users. Ensure the alias call happens in the same session as the anonymous events you want to connect.