Skip to main content

Mixpanel Component

Mixpanel is a SaaS event analytics platform that can track user interactions with web and mobile applications. Data collected can be used to build custom reports and measure user engagement and retention.

Component key: mixpanel

Description

(Mixpanel)[https://mixpanel.com/] is a SaaS event analytics platform that can track user interactions with web and mobile applications. Data collected can be used to build custom reports and measure user engagement and retention.

Connections

API Key

Setting up a Service Account:

  1. In Mixpanel, navigate to the Service accounts tab in your [Organization Settings] (https://mixpanel.com/settings/org#serviceaccounts)
  2. You will be asked to select the role and granted projects of the when creating a service account from the organization's settings page. Select “Add” when completed.
  3. Once completed a Username and Secret are provided. Copy the values into their respective fields in the connection configuration of Prismatic.

Obtaining your Project Token:

  1. A project's token can be found in the Access Keys section of a [project's settings overview page] (https://mixpanel.com/settings/project/)
    1. Copy the value into its respective fields in the connection configuration of Prismatic.

Data Sources

Fetch Funnels

Fetch an array of funnels | key: funnels | type: picklist

Data Source Payload

{
"result": [
{
"label": "Signup funnel",
"key": "7509"
},
{
"label": "Funnel tutorial",
"key": "9070"
}
]
}

Fetch Pipelines

Fetch an array of Pipelines | key: pipelines | type: picklist

Data Source Payload

{
"result": [
{
"label": "events-daily-bigquery-monoschema - PipelineId: 9876543210",
"key": "events-daily-bigquery-monoschema"
},
{
"label": "events-daily-bigquery-multischema - PipelineId: 9876543210",
"key": "events-daily-bigquery-multischema"
}
]
}

Actions

Create Alias

Mixpanel supports adding an alias to a distinct id. | key: createAlias

Output Example Payload

{
"data": 1
}

Create GCS Pipeline

This request creates an export pipeline. | key: createGCSPipeline

Output Example Payload

{
"data": {
"canceled": [
{
"project_id": 0,
"name": "string",
"state": "string",
"last_finish": "string",
"run_at": "string",
"from_date": "string",
"to_date": "string"
}
],
"retried": [
{
"project_id": 0,
"name": "string",
"state": "string",
"last_finish": "string",
"run_at": "string",
"from_date": "string",
"to_date": "string"
}
],
"succeeded": [
{
"project_id": 0,
"name": "string",
"state": "string",
"last_finish": "string",
"run_at": "string",
"from_date": "string",
"to_date": "string"
}
]
}
}

Create Generic Pipeline

This request creates an export pipeline. | key: createGenericPipeline


Create Identity

Creates a new Identity | key: createIdentity

Output Example Payload

{
"data": 1
}

Create Profile

Takes a JSON object containing names and values of profile properties. This API will return a 200 OK even if there are data validation issues. To ensure the request actually succeeded, you need to check the response body. | key: createProfile

Output Example Payload

{
"data": {
"code": 200,
"num_records_imported": 2000,
"status": "OK"
}
}

Custom JQL Query

The HTTP API is the lowest-level way to use JQL. | key: customJQLQuery

Output Example Payload

{
"data": 1
}

Delete Pipeline

Deletes the pipeline and stops any future jobs to be scheduled for the pipeline. | key: deletePipeline

Output Example Payload

{
"data": null
}

Delete Profile

Permanently delete the profile from Mixpanel, along with all of its properties. | key: deleteProfile

Output Example Payload

{
"data": {
"code": 200,
"num_records_imported": 2000,
"status": "OK"
}
}

Download Data

Download your event data as it is received and stored within Mixpanel. | key: downloadData

Output Example Payload

{
"data": [
{
"event": "Signed up",
"properties": {
"time": 1602611311,
"$insert_id": "hpuDqcvpltpCjBsebtxwadtEBDnFAdycabFb",
"mp_processing_time_ms": 1602625711874
}
},
{
"event": "Signed up",
"properties": {
"time": 1602787121,
"$insert_id": "jajcebutltmvhbbholfhxtCcycwnBjDtndha",
"mp_processing_time_ms": 1602801521561
}
}
]
}

Edit GCS Pipeline

This request edit the params for an export pipeline. | key: editGCSPipeline

Output Example Payload

{
"data": null
}

Edit Generic Pipeline

This request edit the params for an export pipeline. | key: editGenericPipeline


Get Pipeline

Given the name of the pipeline this API returns the status of the pipeline. | key: getPipeline

Output Example Payload

{
"data": {
"canceled": [
{
"project_id": 0,
"name": "string",
"state": "string",
"last_finish": "string",
"run_at": "string",
"from_date": "string",
"to_date": "string"
}
],
"retried": [
{
"project_id": 0,
"name": "string",
"state": "string",
"last_finish": "string",
"run_at": "string",
"from_date": "string",
"to_date": "string"
}
],
"succeeded": [
{
"project_id": 0,
"name": "string",
"state": "string",
"last_finish": "string",
"run_at": "string",
"from_date": "string",
"to_date": "string"
}
]
}
}

Import Events

Each request ingests a batch of events into Mixpanel. | key: importEvents

Output Example Payload

{
"data": {
"code": 200,
"num_records_imported": 2000,
"status": "OK"
}
}

List Pipelines

Returns the list of all the pipelines scheduled for a project. | key: listPipelines

Output Example Payload

{
"data": {
"9876543210": [
{
"name": "events-daily-bigquery-monoschema",
"Dispatcher": "backfill",
"last_dispatched": "2019-02-01 12:00:00 US/Pacific",
"frequency": "hourly",
"sync_enabled": "true"
}
]
}
}

List Saved Funnels

Get the names and funnel_ids of your funnels. | key: listSavedFunnels

Output Example Payload

{
"data": [
{
"funnel_id": 7509,
"name": "Signup funnel"
},
{
"funnel_id": 9070,
"name": "Funnel tutorial"
}
]
}

Query Funnel Saved Reports

Get data for a funnel. | key: queryFunnelSavedReports

Output Example Payload

{
"data": {
"meta": {
"dates": [
"2016-09-12",
"2016-09-19",
"2016-09-26"
]
},
"data": {
"2016-09-12": {
"steps": [
{
"count": 32688,
"avg_time": 2,
"avg_time_from_start": 5,
"step_conv_ratio": 1,
"goal": "App Open",
"overall_conv_ratio": 1,
"event": "App Open"
},
{
"count": 20524,
"avg_time": 133,
"avg_time_from_start": 133,
"step_conv_ratio": 0.627875673029858,
"goal": "$custom_event:12345",
"step_label": "Game Played",
"custom_event": true,
"custom_event_id": 12345,
"overall_conv_ratio": 0.627875673029858,
"event": "$custom_event:12345"
}
],
"analysis": {
"completion": 20524,
"starting_amount": 32688,
"steps": 2,
"worst": 1
}
},
"2016-09-19": {
"steps": [
{
"count": 32486,
"avg_time": 10,
"avg_time_from_start": 10,
"step_conv_ratio": 1,
"goal": "App Open",
"overall_conv_ratio": 1,
"event": "App Open"
},
{
"count": 20809,
"avg_time": 75,
"avg_time_from_start": 75,
"step_conv_ratio": 0.6405528535369082,
"goal": "$custom_event:12345",
"step_label": "Game Played",
"custom_event": true,
"custom_event_id": 12345,
"overall_conv_ratio": 0.6405528535369082,
"event": "$custom_event:12345"
}
],
"analysis": {
"completion": 20809,
"starting_amount": 32486,
"steps": 2,
"worst": 1
}
},
"2016-09-26": {
"steps": [
{
"count": 16103,
"avg_time": 10,
"avg_time_from_start": 5,
"step_conv_ratio": 1,
"goal": "App Open",
"overall_conv_ratio": 1,
"event": "App Open"
},
{
"count": 12679,
"avg_time": 571,
"avg_time_from_start": 571,
"step_conv_ratio": 0.7873688132646091,
"goal": "$custom_event:12345",
"step_label": "Game Played",
"custom_event": true,
"custom_event_id": 12345,
"overall_conv_ratio": 0.7873688132646091,
"event": "$custom_event:12345"
}
],
"analysis": {
"completion": 12679,
"starting_amount": 16103,
"steps": 2,
"worst": 1
}
}
}
}
}

Query Insights Saved Reports

Get data from your Insights reports. | key: queryInsightsSavedReports

Output Example Payload

{
"data": {
"computed_at": "2020-09-21T16:35:41.252314+00:00",
"date_range": {
"from_date": "2020-08-31T00:00:00-07:00",
"to_date": "2020-09-12T23:59:59.999000-07:00"
},
"headers": [
"$event"
],
"series": {
"Logged in": {
"2020-08-31T00:00:00-07:00": 9852,
"2020-09-07T00:00:00-07:00": 4325
},
"Viewed page": {
"2020-08-31T00:00:00-07:00": 10246,
"2020-09-07T00:00:00-07:00": 11432
}
}
}
}

Query Profile

Query user profile data and return list of users that fit specified parameters. | key: queryProfiles

Output Example Payload

{
"data": {
"page": 0,
"page_size": 1000,
"results": [
{
"$distinct_id": 4,
"$properties": {
"$created": "2008-12-12T11:20:47",
"$email": "example@mixpanel.com",
"$first_name": "Example",
"$last_name": "Name",
"$last_seen": "2008-06-09T23:08:40"
}
}
],
"session_id": "1234567890-EXAMPL",
"status": "ok",
"total": 1
}
}

Raw Request

Send raw HTTP request to Mixpanel | key: rawRequest


Track Events

Track events to Mixpanel from client devices. | key: trackEvents

Output Example Payload

{
"data": {
"code": 200,
"num_records_imported": 2000,
"status": "OK"
}
}

Update Multiple Profiles

Send a batch of profile updates. | key: updateMultipleProfiles

Output Example Payload

{
"data": 1
}