Mixpanel Community Icon

Required Roles for Events Export API Requests

·
·

What permission or role is required to make a request to the events export api

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

    Hi Jean-Louis M., 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 make a request to the Mixpanel Events Export API, you need one of the following authentication methods:1. Service Account Authentication: You need an Owner or Admin Service Account. The request requires the project_id, service account username, and service account password for authentication.2. Project Token Authentication: You can use a Project Token as an alternative authentication method. You provide the token as the basic auth username value with an empty password.It's important to note that if you're using a Service Account, it must have the appropriate permissions to access the data you're trying to export.Import Events provides more details on the authentication requirements for the Events Export API.

    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 Jean-Louis M.
    Jean-Louis M.
    ·
    ·

    thank you - how would I find the right event key to use to export all events of that name in the last 30s

  • Avatar of Jean-Louis M.
    Jean-Louis M.
    ·
    ·

    kapa.ai how would i be able to reconcile distinct_id values returned from this?

  • 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 reconcile distinct_id values returned from the Events Export API, you'll need to use the identity mapping table if your project has ID merge enabled. This is because the exported event data contains the original user identifiers, not the resolved ones. Here's how you can approach this:1. Use the Identity Mapping Table: When you export data from projects with ID merge enabled, you should use the identity mapping table to accurately count unique users and recreate the identity clusters that Mixpanel creates.2. Replace Non-resolved distinct_id with Resolved distinct_id: You should use the resolved distinct_id from the identity mappings table instead of the non-resolved distinct_id when available. If there's no resolved distinct_id, then use the distinct_id from the existing people or events table.3. For Projects with Original ID Merge: If your project uses the Original ID Merge system, you'll need to use the identity mapping table to replicate the user counts seen in UI reporting. Mixpanel resolves multiple identifiers for an individual into one identifier for reporting unique user counts.4. For Projects with Simplified ID Merge: If your project uses the Simplified ID Merge system, you'll need to look at both the $device_id and $user_id properties to understand the user's identity across anonymous and authenticated states.It's important to note that the exact process may vary depending on which ID merge system your project is using (Original or Simplified) and the data warehouse you're exporting to.For specific examples of querying the identity mapping table, you can refer to the documentation for your specific data warehouse integration:- BigQuery Integration - Snowflake IntegrationRemember, this reconciliation process is necessary because "Pipelines export event data as they appear when Mixpanel ingests them. Data sent before an alias event carries the original user identifier, not the resolved one."JSON Pipelines: User Identity Resolution provides more details on this process.

    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 Jean-Louis M.
    Jean-Louis M.
    ·
    ·

    kapa.ai my project is using original ID merge, how do I go about leveraging this setting?

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

    Since your project is using the Original ID Merge system, you'll need to leverage specific events and methods to manage user identity. Here's how you can go about using this setting:1. Use the $identify event: This event is used to link an Anonymous ID and your chosen User ID together. You can trigger this by calling .identify(<user_id> ) using Mixpanel's Web/Mobile SDKs. This sends an $identify event containing both the $identified_id (your chosen User ID) and $anon_id (the automatically generated $device_id). Example payload:

    "event": "$identify", "properties": { "$identified_id": "<user_id> ", "$anon_id": "<device_id> ", "token": "YOUR_PROJECT_TOKEN" } } ```LBKSLBKS2. Use the `$create_alias` event: This event is used to link two non-anonymous Distinct IDs. You can trigger this by calling `.alias()` using the client-side SDKs.LBKS3. Use the `$merge` event: This event allows you to merge any 2 identifiers together. It can only be processed when sent via the /import API directly.LBKS Example payload: ```LBKS { "event": "$merge", "properties": { "$distinct_ids": [ "user_id_1", "user_id_2" ] } } ```LBKSLBKS4. Implement proper client-side identity management: - Call `.identify(<user_id> )` when a user signs up or logs in. - Call `.reset()` when a user logs out.LBKS5. For server-side implementations: - Generate and manage anonymous IDs yourself. - Set the `distinct_id` event property to the anonymous ID for anonymous events. - Send the `$identify` event to merge IDs once the user logs in.LBKSRemember, with Original ID Merge: - There's a limit of 500 IDs that can be merged into a single ID cluster. - The `distinct_id` is automatically determined by Mixpanel using one of the IDs in the cluster and is not user-configurable.LBKSIt's important to note that "Mixpanel resolves multiple identifiers for an individual into one identifier for reporting unique user counts."LBKSFor more detailed information on implementing Original ID Merge, you can refer to these resources: - [Identifying Users (Original)](https://docs.mixpanel.com/docs/tracking-methods/id-management/identifying-users-original) - [Identity Management Overview](https://docs.mixpanel.com/docs/tracking-methods/id-management#identity-merge-apis)

    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.