What can we help you with?

e.g. Getting Started, Build Dashboards

How to connect to Mixpanel?

1 comment

  • Official comment
    Avatar
    Sherry Quach (Edited )

    UPDATED INSTRUCTIONS (August 2022):

    Setting up the connection to Mixpanel:

    1.  Navigate to Mixpanel and create a service account (Settings -> Organization Settings -> Service Accounts -> + Add Service Account)

    2.  Copy the Username and Secret (Secret will not appear again)
    3.  Navigate to Knowi and create a REST datasource
    4.  Enter the following:

    • Datasource Name: Name of your choice

    • REST Host: https://data.mixpanel.com/api/2.0/

    • Authentication Type: Basic

    • User ID for Basic Authentication: Username (copied in Step 2)

    • Password for Basic Authentication: API Secret (copied in Step 2)

    5. Click 'Save'

    To call into the MixPanel API:
    1.  From the datasource setup above, create a new query.
    2.  Specify the end point. Example: events
    3.  Pass in the relevant URL parameters. Example: project_id=PROJECTID&event=["\"someevent\""]&type=general&from_date=2022-05-28&to_date=2022-05-28&unit=minute

    • (or to supply dynamic dates: project_id=PROJECTID&event=["\"someevent\""]&type=general&from_date={$c9_today-1d:yyyy-MM-dd}&to_date={$c9_today:yyyy-MM-dd}&unit=minute

    4.  Use Cloud9QL or interact with the results to transform the results appropriately.

    Mixpanel Query API documentationhttps://developer.mixpanel.com/reference/query-api

    The API documentation provides the exact URL parameters required for a given endpoint.

    Comment actions Permalink

Please sign in to leave a comment.