Why are my profile properties empty and Distinct Id is unavailable in profile properties but is available in event properties?
Hi Mihir S., 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
This issue is likely related to how Mixpanel's identity management works and how user profiles are created and joined with events. Let me explain the possible causes:
Possible Causes
1. User Profiles Not Created: Events and User Profiles are stored separately in Mixpanel. Just because you have events with a distinct_id doesn't mean a user profile automatically exists for that ID. You need to explicitly create user profiles.2. Identity Management Issues: If you're using Simplified ID Merge, you need to properly include both $device_id
and $user_id
properties in your events for identity merging to take place.3. Timing of Profile Creation: As mentioned in the documentation, "If you track User Profiles after you track events, they'll still join retroactively with all past events" User Profiles FAQ. This means you may have events but no profiles yet.
How to Fix This
1. Create User Profiles: Make sure you're explicitly creating user profiles with the same distinct_id as your events. You can do this through the HTTP Engage API or through SDKs.2. Check Your Identity Management Implementation: If using Simplified ID Merge, ensure you're including both $device_id
and $user_id
properties in your events when a user is identified: LBKS{ "event": "Sign In", "properties": { "token": "{{token}}", "$device_id": "anonymous222", "$user_id": "charlie" } }LBKS
3. Verify Distinct ID Consistency: Make sure the distinct_id used in your events matches the distinct_id used for your user profiles. In Simplified ID Merge, the distinct_id will be set to the value of $user_id
if present; otherwise, it takes $device_id
and prefixes it with $device:
Identifying Users (Simplified).4. Debug Using Events View: Use the Events view in Mixpanel to find your events and check what distinct_id they have. Then make sure your user profiles use the same distinct_id. You can also use the User Profiles view to check if profiles exist Debugging.Remember that user profiles are optional in Mixpanel. The documentation states: "User Profiles let you enrich events with demographic attributes (i.e. user properties) about the users that performed those events. User Profiles are optional. We recommend starting with events and adding user profiles only if needed." User Profileskapa.ai: I'm here to help with any further questions about Mixpanel!
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.
Let me check the knowledge base for you again. One moment! 📚
Yes, you can manually create user profiles with the same distinct_id as your existing events, and they will automatically connect with your event data. Mixpanel joins events and user profiles at query-time rather than ingestion-time, which means profiles will retroactively join with past events.As explained in the Mixpanel documentation: > "If you track User Profiles after you track events, they'll still join retroactively with all past events. This means that you don't need to worry about tracking Events and User Profiles in lockstep with each other. As long as they have the same values for Distinct ID, they'll join with each other." User Profiles FAQYou have several options to manually create these profiles: 1. Using the UI: You can add/edit profiles directly from the Users page in Mixpanel.2. Bulk Import via CSV: You can prepare a CSV file (without headers) and import it through the Mixpanel UI. Make sure to map the correct column to $distinct_id
during import.3. Using the API: You can use Mixpanel's Engage API to create profiles programmatically. Here's a sample code: ```
Fill this out with your project token
PROJECT_TOKEN = ""import json import requestsdef get_users_from_database():
Replace this with code that reads users from your database or CRM
return [
{"user_id": "123", "$name": "Alice", "$email": "alice@linear.app", "department": "engineering"},
{"user_id": "456", "$name": "Bob", "$email": "bob@notion.so", "department": "product"}
]def transform_to_mp_format(user):
distinct_id = user.pop("user_id")
return {"$distinct_id": distinct_id, "$token": PROJECT_TOKEN, "$ip": "0", "$set": user}users = get_users_from_database()
profiles = [transform_to_mp_format(u) for u in users]resp = requests.post(
"https://api.mixpanel.com/engage",
params={"verbose": "2"},
headers={"Content-Type": "application/json"},
data=json.dumps(profiles)
)print(resp.json())```The most important thing is to ensure that the $distinct_id
value you use for the profiles matches exactly the distinct_id used in your events. Once you've created the profiles with matching distinct_ids, Mixpanel will automatically join them with your existing event data when you run reports.
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.
Let me check the knowledge base for you again. One moment! 📚
You need to import the user profile data explicitly - Mixpanel doesn't automatically create user profiles from event data.When you track events in Mixpanel, the system doesn't automatically create user profiles with properties from those events. Events and User Profiles are stored in separate tables in Mixpanel and are joined at query-time based on the distinct_id.As the documentation states: > "User Profiles let you enrich events with demographic attributes (i.e. user properties) about the users that performed those events. User Profiles are optional. We recommend starting with events and adding user profiles only if needed." User ProfilesYou have several options to import user profile data: 1. Manual Import via UI: You can add profiles through the Mixpanel UI by clicking "Add/Edit Profile" from the Users page Importing Profiles via the UI2. Bulk Import via CSV: You can upload a CSV file with user data Importing Profiles via the UI3. API Import: You can use Mixpanel's Engage API to programmatically create or update profiles Importing Profiles via API4. Warehouse Connectors: If you have your user data in a data warehouse, you can use Mixpanel's Warehouse Connectors to sync it Building complete and accurate user profilesThe key point is that you need to explicitly create the user profiles with the same distinct_id as your events. Once you do that, they will automatically join with your existing event data when you run reports.
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.
Let me check the knowledge base for you again. One moment! 📚
No, user profiles in Mixpanel are more than just a list of distinct_ids. User profiles are collections of properties (attributes) that describe individual users in your product.According to the Mixpanel documentation: > "A user profile has a set of user properties associated with a given user. Under the hood, Mixpanel stores user data for your project in a table wherein each row of user profile contain columns of user properties (e.g. Name, Email, Department) that can be updated." User ProfilesUser profiles typically contain: 1. Demographic information about users (name, email, location, etc.) 2. Current state information (subscription tier, account status, etc.) 3. Other attributes that describe the userEach user profile is identified by a distinct_id, which is the same identifier used in events. This allows Mixpanel to join events with the corresponding user profile at query time.User profiles are separate from events and are stored in a different table. While events are immutable (historical records of actions), user profiles are mutable and typically represent the current state of a user.As the documentation explains: > "Profile Properties give you detail about a certain user overall. In other words, Profile Properties describe your users as they exist in this moment. A user profile property could be a static value, such as a first name, or be something more likely to change, like the date of last login or the number of songs a user has played." Data ModelSo when we talk about user profiles, we're referring to these collections of properties that describe each user, not just a list of distinct_ids.
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.
Let me check the knowledge base for you again. One moment! 📚
Yes, that's correct. To create user profiles in Mixpanel, you need to: 1. Extract the distinct_ids from your existing events data 2. Gather any user attributes you want to include in the profiles 3. Upload this data to create user profilesAs the documentation explains: > "We recommend tracking profiles from as close as possible to the source of truth, which is usually your application database or your CRM." User ProfilesYou have several options for this process:
Option 1: Export and Upload
You can export your event data with distinct_ids using Mixpanel's Export API, gather the user attributes you want, and then upload them as user profiles via CSV or the Engage API.
Option 2: Direct API Import
You can programmatically create user profiles using the Engage API. Here's a sample code from the documentation: ```
Fill this out with your project token
PROJECT_TOKEN = ""
import json import requests
def get_users_from_database():
Replace this with code that reads users from your database or CRM
return [ {"user_id": "123", "$name": "Alice", "$email": "alice@linear.app", "department": "engineering"}, {"user_id": "456", "$name": "Bob", "$email": "bob@notion.so", "department": "product"} ]
def transform_to_mp_format(user): distinct_id = user.pop("user_id") return {"$distinct_id": distinct_id, "$token": PROJECT_TOKEN, "$ip": "0", "$set": user}
users = get_users_from_database() profiles = [transform_to_mp_format(u) for u in users]
resp = requests.post( "https://api.mixpanel.com/engage", params={"verbose": "2"}, headers={"Content-Type": "application/json"}, data=json.dumps(profiles) )```Project MigrationThe most important thing is ensuring the distinct_id in your user profiles matches exactly the distinct_id used in your events. Once you've created the profiles with matching distinct_ids, Mixpanel will automatically join them with your existing event data when you run reports.Remember that user profiles are optional in Mixpanel, but they're useful for enriching your event data with demographic information about 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.