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 Yanisa 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'll need to follow these steps: 1. First, prepare your CSV file without column headers. Your CSV should contain the user IDs that you want to include in your cohort.2. Navigate to the Users page in Mixpanel by going to the Data Management tab.3. Click on "Add/Edit Profile" from the Users page.4. Select the "Import from CSV" tab.5. Upload your prepared CSV file.6. When mapping columns, make sure to designate the column containing your user IDs as the $distinct_id column. This is crucial as it's the identifier Mixpanel uses to match with your event data.7. If you have additional properties in your CSV that you want to import, map those columns appropriately. Otherwise, uncheck columns you don't want to import.8. Click "Import profiles" to proceed with the upload.9. After importing the profiles, you can create a cohort based on these users by: - Going to the Cohort Builder - Creating a filter based on the property you used to identify this group (you could add a unique property to all these users during import) - Saving this as a new cohortAs noted in the documentation, "To upload a group of user profiles and easily sort them into a cohort, add a value to the CSV which sorts the profiles into a cohort as a property. For example, give each profile the unique property of 'Cohort = Android Users'. Next, go to the Cohorts tab to create a cohort as usual, and filter to user profiles with that property and save." Users: Explore your user base in MixpanelKeep in mind that cohorts created this way will remain static and won't update automatically over time since they're based on unchanging 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 Yanisa S.
    Yanisa S.
    ·
    ·

    kapa.ai will this create a duplicate profile of existing user id, or just add additional property?

  • 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
    ·
    ·

    Based on the knowledge sources, when you upload a CSV with user IDs that already exist in Mixpanel, it will update those existing profiles rather than create duplicates. Here's what happens specifically: If you import profiles using $distinct_id values that already exist in your Mixpanel project: - Those existing profiles will be updated with the additional profile properties from your CSV - If you're uploading new information for existing properties, the existing property values will be overwritten - If you're uploading information for new properties on existing profiles, it will be added as additional propertiesAs stated in the documentation: "If you import profiles using $distinct_id (or $group_id) values that already exist, those profiles will be updated with the additional profile properties." User Profile: Demographic attributes for your usersHowever, it's important to note that if you upload a profile with the same email address or name as another existing profile, but with a different $distinct_id, you will create duplicate profiles - they will not be combined automatically.So to directly answer your question: uploading a CSV with existing user IDs will not create duplicate profiles, but will update the existing profiles with any new properties or overwrite existing properties with new values.

    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 Yanisa S.
    Yanisa S.
    ·
    ·

    i use $user id instead of distinct id

  • Avatar of Yanisa S.
    Yanisa S.
    ·
    ·

    kapa.ai i use $user id instead of distinct id

  • 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
    ·
    ·

    I understand you're using $user_id instead of distinct_id in your Mixpanel implementation. This is actually aligned with Mixpanel's Simplified ID Merge system, which is their recommended approach.In Mixpanel's Simplified ID Merge system, the $user_id property is used to identify authenticated users, while $device_id is used for anonymous users. When both properties are present on an event, Mixpanel automatically merges the identities.When importing profiles via CSV, you should still use the $distinct_id column to map to your user identifiers. This is because under the hood, Mixpanel uses the distinct_id as the canonical identifier for profiles, but when using the Simplified ID Merge system, the value of $user_id becomes the distinct_id for identified users.As the documentation states:

    "If Mixpanel receives an event with both $device_id and $user_id set, it will merge the two IDs together. This is essential to track pre-login and post-login behavior accurately. The distinct_id will be assumed to the $user_id." Identifying Users (Simplified)So when uploading your CSV, you should map your user identifiers to the $distinct_id column, and these values should match the $user_id values you're sending in your events for proper identity resolution.

    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.