Mixpanel Community Icon

how to create a cohort by uploading a csv of user Ids?

·
·

how to create a cohort by uploading a csv of user Ids?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Hi Dr. 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

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    To create a cohort by uploading a CSV of user IDs in Mixpanel, you can follow these steps: 1. Prepare your CSV file: - Do not include column headers in the CSV. - The most important column should be the $distinct_id for user profiles. - The $distinct_id values should match the ones you're sending on your events.2. Import the CSV: - Go to the "Import from CSV" tab in Mixpanel. - Select your prepared CSV file to begin the import process.3. Choose the identifier column: - Select the column that contains the $distinct_id values. - This step is crucial to ensure proper user identification.4. Select the desired CSV columns: - Review all columns in the CSV and uncheck those you don't want to import. - Map each selected column to the appropriate Mixpanel profile property.5. Import the profiles: - After selecting and mapping the columns, click the "Import profiles" button.6. Create a cohort: - Once the profiles are imported, you can create a cohort based on these users. - Go to the Cohort Builder and define your cohort using the imported user IDs.For more detailed information on importing profiles via CSV and creating cohorts, you can refer to these Mixpanel documentation pages: User Profile: Demographic attributes for your users Cohorts: Group users by demographic and behaviorRemember that the maximum size for your CSV should be 1M rows, and if you import profiles with existing $distinct_id values, those profiles will be updated with the additional profile properties.

    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.

  • Avatar of Sam B.
    Sam B.
    ·
    ·

    kapa.ai What if $distinct_id doesn't appear as a suggested column, and if I paste in $distinct_id it simply creates new accounts and fails to match

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Let me check the knowledge base for you again. One moment! đź“š

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    If $distinct_id doesn't appear as a suggested column and pasting it in creates new accounts instead of matching existing ones, this indicates a potential mismatch between the identifiers in your CSV and the distinct_id values used in your Mixpanel events. Here are some important points to consider: 1. Identifier Consistency: Make sure the identifiers in your CSV exactly match the distinct_id values you're using in your events. As mentioned in the User Profile documentation: "The value needs to match the distinct_id property's value (or the value for the Group Key's Group ID) that you're sending on your events."2. Case Sensitivity: Check if the distinct_id values in your CSV are case-sensitive and match exactly with what's in Mixpanel.3. Alternative Identifiers: If you're not using $distinct_id directly, you might be using a different identifier. As stated in the FAQ section: "If you do not assign an identifier column, Mixpanel will use your $email column as the $distinct_id (or $group_id) value; if you don't have an $email column either, then the $distinct_id (or $group_id) value will be assigned randomly by default."4. Verify CSV Format: Ensure your CSV is formatted correctly. As mentioned in the Bulk Import from CSV section: "When preparing the CSV that you want to upload as profiles, you should not include column headers (e.g., email, etc.). Instead, you'll identify column headers through the CSV upload wizard in the Mixpanel UI."5. Check for Duplicates: Be aware that uploading profiles with different $distinct_id values but the same email or name will create duplicates. As the documentation states: "If you upload a profile that has the same email address or the same name as another existing profile, but a different $distinct_id (or $group_id), you will be uploading duplicates - they will not be combined."If you've verified all these points and are still experiencing issues, it's possible that there might be a discrepancy between the identifiers used in your events and those in your CSV. In this case, you may need to review your event tracking implementation to ensure consistency in how you're identifying users across your system and Mixpanel.For further assistance, you might want to contact Mixpanel's support team, as they can provide more specific guidance based on your project's setup.

    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.

  • Avatar of Sam B.
    Sam B.
    ·
    ·

    I have Users and account_id, how can I find the $distinct_id or $group_id for account_id? kapa.ai

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Let me check the knowledge base for you again. One moment! đź“š

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    To find the $distinct_id or $group_id for an account_id in Mixpanel, you'll need to consider how your data is structured and how you've implemented user and group identification. Based on the information provided in the knowledge sources, here are some approaches you can take: 1. For User Profiles ($distinct_id): If your account_id is associated with individual users, you might have set it as a user property. In this case, you can: a. Go to the Users report in Mixpanel. b. Use the query builder to filter users based on the account_id property. c. This should show you the users (and their $distinct_id values) associated with that account_id.2. For Group Profiles ($group_id): If you're using Group Analytics and your account_id is set up as a group identifier: a. Go to the Users report. b. Click the "Analyze Uniques by" dropdown above the query builder. c. Select your group identifier (which should be your account_id). d. This will show you the group profiles, where the account_id itself would be the $group_id.3. Using JQL (JavaScript Query Language): If you need to programmatically find this information, you can use JQL. The JQL documentation shows that you can access both the distinct_id and event properties in your queries.4. Checking Event Data: If you've been sending the account_id as an event property along with your events, you can: a. Go to the Events report. b. Filter for events that have the account_id property set to the value you're looking for. c. Look at the User column to see the associated distinct_id.5. Identity Resolution: If you're using ID merge, you might need to use the identity mapping table to find the resolved distinct_id for a given account_id.It's important to note that the exact method will depend on how you've structured your data and implemented user/group identification in Mixpanel. If you're still unable to find the correct identifiers, you may need to review your implementation or consult with your development team to understand how account_ids are mapped to $distinct_id or $group_id in your specific setup.If you need further assistance, it would be best to contact Mixpanel support, as they can provide guidance tailored to your specific project setup and data structure.

    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.