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", "email": "alice@​linear.app", "department": "engineering"},
{"user_id": "456", "email": "bob@​notion.so", "department": "product"}
]def transform_to_mp_format(user):
distinct_id = user.pop("user_id")
return {"token": PROJECT_TOKEN, "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", "email": "alice@​linear.app", "department": "engineering"}, {"user_id": "456", "email": "bob@​notion.so", "department": "product"} ]
def transform_to_mp_format(user): distinct_id = user.pop("user_id") return {"token": PROJECT_TOKEN, "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.
Let me check the knowledge base for you again. One moment! 📚
Based on the knowledge sources provided, Mixpanel does offer filtering capabilities that allow you to exclude specific distinct IDs, but the exact syntax differs depending on which part of Mixpanel you're using.In Mixpanel's query builder interface, you can use the "is not" operator rather than a specific "NOT IN" function. When you need to filter out multiple distinct IDs, you would typically: 1. Use the Filter button in the report interface 2. Select "distinct_id" as the property 3. Choose the "is not" operator 4. Enter each value you want to excludeFor more complex filtering needs, Mixpanel offers different approaches depending on the interface:
In JQL (JavaScript Query Language)
If you're using JQL for custom queries, you can use JavaScript's filtering capabilities: LBKSfunction main() { return Events({ from_date: "2016-01-01", to_date: "2016-01-07" }) .filter(function(event) { // Exclude specific distinct_ids const excludeIds = ["ID1", "ID2", "ID3", "ID4"]; return !excludeIds.includes(event.distinct_id); }); }LBKS
JQL: Create custom queries using Javascript code
In Query Builder
The Query Builder in Mixpanel reports allows you to add inline filters where you can specify conditions. You can select whether you want your query to match any or all of the filters by clicking on "and/or" beside the filters, which gives you flexibility in constructing complex filter conditions.Reports OverviewIf you're working with a large list of IDs to exclude, you might want to consider creating a cohort that contains all users except those with the specific distinct IDs, and then filter by that cohort instead.Note that JQL is in maintenance mode, so if you're doing extensive custom querying, Mixpanel recommends using their Data Pipelines add-on to export events to your data warehouse for more flexible querying.Is there a specific report or interface in Mixpanel where you're trying to use this NOT IN functionality?
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! 📚
I understand you're looking to exclude specific distinct IDs across all Mixpanel reports. Here's how you can do this:
Global Filters
The most efficient way to exclude specific distinct IDs across all reports is to use global filters at the board level: 1. Navigate to your board containing multiple reports 2. Click "Add Filter" at the top right of the board 3. Select "distinct_id" as the property 4. Choose the "is not" operator 5. Enter the IDs you want to exclude 6. Click "Save to Board" to make this filter persistentAs the documentation explains:
"Boards allow you to alter some aspects of the queries within each of the reports on that board, making it simple to ensure every report is showing results from a consistent set of data. Both date ranges and filters can be added by clicking 'Add Filter' at the top right of the board." Boards: Board-wide Date Ranges and Filters
Data Views (Enterprise Plan)
If you're on an Enterprise plan, a more permanent solution is to create a Data View that excludes these IDs: 1. Navigate to Project Settings 2. Select Data Views 3. Create a new Data View 4. Add a filter for "distinct_id" is not in your list of IDs 5. Set this Data View as defaultThis approach is described in the documentation:
"Data Views allow you to manage data access for a group of users within a single Mixpanel project. Project Owners and Admins can create and edit Data Views and determine access for privacy and productivity purposes." Data Views & Classification
Using Cohorts
Another approach is to create a cohort that excludes these distinct IDs, then filter by this cohort in your reports: 1. Create a cohort with the condition "distinct_id is not [ID1, ID2, ID3, ID4]" 2. In each report, add a filter for "In Cohort" and select your exclusion cohortThis allows you to maintain the exclusion list in one place (the cohort) and apply it consistently across reports.Would you like more specific guidance on any of these approaches?kapa.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! 📚
I can help you create a visualization that shows total searches per day in Mixpanel. Here's how to do it using Insights:
Creating a Total Searches Per Day Visualization
1. Go to the Insights report in Mixpanel 2. Click "Select Event" and choose your "search performed" event 3. For the measurement, change from the default "Unique Users" to "Total Events" (this will count the total number of searches rather than unique users who searched) 4. Set your desired date range in the date picker 5. For visualization, make sure you're using a line chart or column chart with "day" as the time unitThis will give you a visualization showing the total number of search events performed each day over your selected time period.Insights: Visualize trends and compositions within your data explains that Insights is designed for exactly this type of trend analysis, allowing you to "visualize trends and compositions within your data."
Advanced Options
If you want to further refine your visualization: - Add filters: If you want to see searches from specific platforms or user segments, use the Filter button - Change chart type: You can switch between line chart, column chart, or other visualizations by clicking the chart type selector in the top right - Aggregate property: If your search event includes a property that counts multiple searches in a single event, you could use the "Aggregate Property" measurement insteadFor the unit of time, the documentation mentions: "This can be 'hour' or 'day'. This determines the buckets into which the property values that you segment on are placed. The default value is 'day'." Query API - SegmentationWould you like me to explain any specific part of this process in more detail?kapa.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.