Mixpanel
Mixpanel is an analytics service used for tracking user interactions with web and mobile applications.
Bruin supports Mixpanel as a source for Ingestr assets. You can ingest data from Mixpanel into your data platform.
To set up a Mixpanel connection, add a configuration item in the .bruin.yml file and in your asset file. The configuration requires username, password, project_id and optionally server (defaults to eu).
Follow these steps to set up Mixpanel and run ingestion.
Step 1: Add a connection to the .bruin.yml file
yaml
connections:
mixpanel:
- name: "mixpanel"
username: "service-account-username"
password: "service-account-secret"
project_id: "12345"
server: "eu"username: Mixpanel service account username.password: Secret associated with the service account.project_id: The numeric project ID.server: (Optional) Server region (us,eu, orin). Defaults toeu.
Step 2: Create an asset file for data ingestion
Create an asset configuration file (e.g., mixpanel_ingestion.yml) inside the assets folder with the following content:
yaml
name: public.mixpanel
type: ingestr
parameters:
source_connection: mixpanel
source_table: 'events'
destination: postgresname: The name of the asset.type: Alwaysingestrfor Mixpanel.source_connection: The Mixpanel connection name defined in.bruin.yml.source_table: Name of the Mixpanel table to ingest.destination: The destination connection name.
Available Source Tables
| Table | PK | Inc Key | Inc Strategy | Details |
|---|---|---|---|---|
| events | distinct_id | time | merge | Retrieves events data |
| profiles | distinct_id | last_seen | merge | Retrieves Mixpanel user profiles and attributes. |
Step 3: Run asset to ingest data
bruin run assets/mixpanel_ingestion.ymlRunning this command ingests data from Mixpanel into your Postgres database.
