Mixpanel Community Icon

how to extract the activity feed in Mixpanel as a csv ? kapa.ai

·
·

how to extract the activity feed in Mixpanel as a csv ? kapa.ai

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

    To extract the activity feed in Mixpanel as a CSV, you have a couple of options:1. Using the Activity Feed API: Mixpanel provides an Activity Feed API that allows you to query a profile's recent event history. However, this API doesn't directly output CSV. You would need to make an API call and then convert the JSON response to CSV format yourself. Here's how you can query the API:

    ```LBKSLBKS You'll need to provide parameters like `project_id`, `distinct_ids`, `from_date`, and `to_date`. The API has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.LBKS [Query API - Activity Feed](https://github.com/mixpanel/docs/blob/main/openapi/src/query.openapi.yaml)LBKS2. Using the Google Sheets Integration: Mixpanel offers a Google Sheets integration that allows you to export data, including reports and cohorts, directly to a Google Sheet. While this doesn't specifically mention the activity feed, it might be a useful alternative if you're looking for user-level data. Once the data is in Google Sheets, you can easily download it as a CSV.LBKS [Mixpanel Google Sheets Integration](https://docs.mixpanel.com/docs/tracking-methods/integrations/google-sheets)LBKS3. Using the Mixpanel Utils Python Library: If you're comfortable with Python, you can use the Mixpanel Utils library to export data. While it doesn't have a specific function for the activity feed, you might be able to use the `export_people` function to get user-level data, which you can then save as a CSV:LBKS ```LBKS mputils.export_people('people_export.txt', parameters, timezone_offset=-8, format='csv') ```LBKSLBKS [Mixpanel Utils GitHub](https://github.com/mixpanel/mixpanel-utils/blob/master/README.md)LBKSIt's important to note that none of these methods explicitly mention exporting the activity feed as a CSV. The activity feed might be considered part of the user profile data or event data, depending on how Mixpanel structures it. If you need the exact activity feed as seen in the Mixpanel UI, you might need to contact Mixpanel support for more specific guidance.

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

    how to export the activities a user interacted with in a session in Mixpanel 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 export the activities a user interacted with in a session in Mixpanel, you have a couple of options:1. Raw Event Export API: You can use Mixpanel's Raw Event Export API to export event data, which includes user activities. This method allows you to export raw event data for specific users or time periods. Here's an example of how to use the API:

    --url '[https://data.mixpanel.com/api/2.0/export?from_date=2024-07-23&to_date=2024-07-24&limit=100&event=sample_event](https://data.mixpanel.com/api/2.0/export?from_date=2024-07-23&to_date=2024-07-24&limit=100&event=sample_event)' \ --header 'accept: text/plain' \ --header 'authorization: Basic YOUR_TOKEN' ```LBKSLBKS You can modify the parameters to filter for specific users or events. The exported data will be in JSONL format, where each line is a valid JSON object representing an event.LBKS [Export Methods](https://docs.mixpanel.com/docs/export-methods)LBKS2. Query API: Mixpanel's Query API allows you to obtain calculated and formatted results similar to what you see in the web app. You can use the `/engage` endpoint to return user profiles and activity streams for specific users. This API can:LBKS - Filter or break down Events - Return user profiles - Return an activity/event stream for a userLBKS [Query API](https://github.com/mixpanel/docs/blob/main/reference/Query%20API/query-api.md)LBKS3. Session Replay: If you're looking for a more visual representation of user activities within a session, Mixpanel offers Session Replay. While this doesn't provide a direct export, it allows you to watch replays of user sessions and see the events that occurred during each replay. You can access Session Replay from:LBKS - User Profile page - Mixpanel reports (Event, Funnel, and User Profile metrics) - Home page of your projectLBKS The Replay Player shows events in the replay timeline and allows you to see a feed of events that occurred during each replay.LBKS [Session Replay](https://docs.mixpanel.com/docs/session-replay)LBKSIt's important to note that the exact method for exporting activities within a specific session may depend on how you've defined and tracked sessions in Mixpanel. If you need a more tailored solution, you might need to combine data from these methods or reach out to Mixpanel support for specific guidance on exporting session-level activity data.

    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.