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.
InputNotes
Password
password
password
Password of your Mixpanel Service Account
Project Token
password
projectToken
Project Token of your Mixpanel Account
Username
string
username
Username of your Mixpanel Service Account

Data Sources

Fetch Funnels

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

InputNotesExample
Connection
connection
/ Required
connection
 
 
Project ID
string
/ Required
project_id
Required if using service account (Username and Password) to authenticate request.
12345
Region and Domain
string
/ Required
regionAndDomain
The server location to be used: * `mixpanel` - The default (US) servers used for most projects * `eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Workspace ID
string
workspace_id
The id of the workspace if applicable.
12345

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

Fetch Pipelines

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

InputNotesExample
Connection
connection
/ Required
connection
 
 
Data and Domain
string
/ Required
dataAndDomain
The server location to be used: * `data.mixpanel` - The default (US) servers used for most projects * `data-eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Project ID
string
/ Required
project_id
Required if using service account (Username and Password) to authenticate request.
12345

{
"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

InputNotesExample
Alias
string
/ Required
alias
A new distinct_id to be merged with the original distinct_id. Each alias can only map to one distinct_id.
12312
Connection
connection
/ Required
connection
 
 
Distinct ID
string
/ Required
distinct_id
The distinct ID post-identification (same as $identified_id - it will be inferred from $identified_id if not included)
123
Project Token
string
/ Required
project_token
The project token.
725a93138a7d12sd00f16912848590ae7
Redirect
string
redirect
If present, Mixpanel will serve a redirect to the given url as a response to the request. This is useful to add link tracking in notifications.
https://exampleurl.com
Region
string
/ Required
region
The server location to be used: * `api` - The default (US) servers used for most projects * `api-eu` - EU servers if you are enrolled in EU Data Residency
 
Strict
string
strict
If present and equal to 1, Mixpanel will validate the provided records and return a JSON object with per-record error messages for records that fail validation.
1
Verbose
string
verbose
If present and equal to 1, Mixpanel will respond with a JSON Object describing the success or failure of the tracking call. The returned object will have two keys: status, with the value 1 on success and 0 on failure, and error, with a string-valued error message if the request wasn't successful. This is useful for debugging during implementation.
1

{
"data": 1
}

Create GCS Pipeline

This request creates an export pipeline. | key: createGCSPipeline

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Data and Domain
string
/ Required
dataAndDomain
The server location to be used: * `data.mixpanel` - The default (US) servers used for most projects * `data-eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Events
string
Value List
events
000xxx
A whitelist for the event you intend to export. It is okay to pass this multiple times to whitelist multiple events.
event_name_1, event_name_2
Frequency
string
frequency
daily
frequency can be either hourly or daily. hourly exports the data every hour. daily exports the data at midnight (based on the projects timezone). frequency should only be passed if your export window is indefinite.
 
From Date
string
/ Required
from_date
The starting date of the export window. It is formatted as YYYY-MM-DD and cannot be more than six months in the past. If trial is set to true this will default to the previous day; otherwise, it is a required parameter.
2022-01-01
GCS Bucket
string
/ Required
gcs_bucket
The GCS bucket to export the Mixpanel data to.
gcs_bucket_name
GCS Prefix
string
gcs_prefix
The GCS path prefix of the bucket.
/path/to/prefix
GCS Region
string
/ Required
gcs_region
northamerica-northeast1
The GCS region for the bucket.
northamerica-northeast1
Project ID
string
project_id
Your project id (must be specified when using service account based authentication)
12345
To Date
string
to_date
The ending date of the export window. It is formatted as YYYY-MM-DD. The export will continue indefinitely if to_date is empty.
2022-01-01
Trial
string
trial
A trial pipeline will be created if value is true.
 
Where
string
where
A selector expression used to filter by events data, such as event properties. Learn more about how to construct event selector expressions here.
properties['account_id'] in [1,2,3,4]

{
"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

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Data
string
data
The HTTP body payload to send to the URL.
{"exampleKey": "Example Data"}
Data and Domain
string
/ Required
dataAndDomain
The server location to be used: * `data.mixpanel` - The default (US) servers used for most projects * `data-eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Debug Request
boolean
debugRequest
false
Enabling this flag will log out the current request.
 
File Data
string
Key Value List
fileData
File Data to be sent as a multipart form upload.
[{key: "example.txt", value: "My File Contents"}]
File Data File Names
string
Key Value List
fileDataFileNames
File names to apply to the file data inputs. Keys must match the file data keys above.
 
Form Data
string
Key Value List
formData
The Form Data to be sent as a multipart form upload.
[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header
string
Key Value List
headers
A list of headers to send with the request.
User-Agent: curl/7.64.1
Max Retry Count
string
maxRetries
0
The maximum number of retries to attempt.
 
Method
string
/ Required
method
The HTTP method to use.
 
Query Parameter
string
Key Value List
queryParams
A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
 
Response Type
string
/ Required
responseType
json
The type of data you expect in the response. You can request json, text, or binary data.
 
Retry On All Errors
boolean
retryAllErrors
false
If true, retries on all erroneous responses regardless of type.
 
Retry Delay (ms)
string
retryDelayMS
0
The delay in milliseconds between retries.
 
Timeout
string
timeout
The maximum time that a client will await a response to its request
2000
URL
string
/ Required
url
/nessie/pipeline/create
The endpoint to send the request to. Defaults to /nessie/pipeline/create.
/sobjects/Account
Use Exponential Backoff
boolean
useExponentialBackoff
false
Specifies whether to use a pre-defined exponential backoff strategy for retries.
 

Create Identity

Creates a new Identity | key: createIdentity

InputNotesExample
Anon ID
string
/ Required
anon_id
A distinct_id to merge with the $identified_id. The $anon_id must be UUID v4 format and not already merged to an $identified_id.
3e2a0d22-7465-4dc3-a2ab-56f8762e1a29
Connection
connection
/ Required
connection
 
 
Identified ID
string
/ Required
identified_id
A distinct_id to merge with the $anon_id.
123
Project Token
string
/ Required
project_token
The project token.
725a93138a7d12sd00f16912848590ae7
Redirect
string
redirect
If present, Mixpanel will serve a redirect to the given url as a response to the request. This is useful to add link tracking in notifications.
https://exampleurl.com
Region
string
/ Required
region
The server location to be used: * `api` - The default (US) servers used for most projects * `api-eu` - EU servers if you are enrolled in EU Data Residency
 
Strict
string
strict
If present and equal to 1, Mixpanel will validate the provided records and return a JSON object with per-record error messages for records that fail validation.
1
Verbose
string
verbose
If present and equal to 1, Mixpanel will respond with a JSON Object describing the success or failure of the tracking call. The returned object will have two keys: status, with the value 1 on success and 0 on failure, and error, with a string-valued error message if the request wasn't successful. This is useful for debugging during implementation.
1

{
"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

InputNotesExample
Connection
connection
/ Required
connection
 
 
Properties
code
/ Required
properties
Takes a JSON object containing names and values of profile properties. If the profile does not exist, it creates it with these properties. If it does exist, it sets the properties to these values, overwriting existing values.
Redirect
string
redirect
If present, Mixpanel will serve a redirect to the given url as a response to the request. This is useful to add link tracking in notifications.
https://exampleurl.com
Region
string
/ Required
region
The server location to be used: * `api` - The default (US) servers used for most projects * `api-eu` - EU servers if you are enrolled in EU Data Residency
 
Verbose
string
verbose
If present and equal to 1, Mixpanel will respond with a JSON Object describing the success or failure of the tracking call. The returned object will have two keys: status, with the value 1 on success and 0 on failure, and error, with a string-valued error message if the request wasn't successful. This is useful for debugging during implementation.
1

{
"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

InputNotesExample
Connection
connection
/ Required
connection
 
 
Params
code
params
A JSON-encoded object that will be made available to the script as the params global variable.
Project ID
string
project_id
Required if using service account (Username and Password) to authenticate request.
12345
Region and Domain
string
/ Required
regionAndDomain
The server location to be used: * `mixpanel` - The default (US) servers used for most projects * `eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Script
string
/ Required
script
The script to run.
function main(){return Events(params).groupBy(['name'],mixpanel.reducer.count())}
Workspace ID
string
workspace_id
The id of the workspace if applicable.
12345

{
"data": 1
}

Delete Pipeline

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

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Data and Domain
string
/ Required
dataAndDomain
The server location to be used: * `data.mixpanel` - The default (US) servers used for most projects * `data-eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Name
string
/ Required
name
The name that uniquely identifies the pipeline.
pipelineName
Project ID
string
project_id
Required if using service account (Username and Password) to authenticate request.
12345
Use Project Token
boolean
useProjectToken
Use the Connection project token to authenticate the request.
 

{
"data": null
}

Delete Profile

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

InputNotesExample
Connection
connection
/ Required
connection
 
 
Delete Profiles
code
/ Required
deleteProfiles
Permanently delete the profile from Mixpanel, along with all of its properties. The $delete object value is ignored - the profile is determined by the $distinct_id from the request itself.
Redirect
string
redirect
If present, Mixpanel will serve a redirect to the given url as a response to the request. This is useful to add link tracking in notifications.
https://exampleurl.com
Region
string
/ Required
region
The server location to be used: * `api` - The default (US) servers used for most projects * `api-eu` - EU servers if you are enrolled in EU Data Residency
 
Verbose
string
verbose
If present and equal to 1, Mixpanel will respond with a JSON Object describing the success or failure of the tracking call. The returned object will have two keys: status, with the value 1 on success and 0 on failure, and error, with a string-valued error message if the request wasn't successful. This is useful for debugging during implementation.
1

{
"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

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Data and Domain
string
/ Required
dataAndDomain
The server location to be used: * `data.mixpanel` - The default (US) servers used for most projects * `data-eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Event Name
string
event
The event or events that you wish to get data for, encoded as a JSON array.
AnEventName
From Date
string
/ Required
from_date
The date in yyyy-mm-dd format to begin querying from. This date is inclusive.
2022-01-01
Gzip Encoding
boolean
gzipEncoding
false
Whether the response should be compressed with gzip, and Content-Encoding will be set to gzip
false
Limit
string
limit
Return the top property values. Defaults to 255 if not explicitly included. Maximum value 10,000. This parameter does nothing if 'on' is not specified.
255
Project ID
string
project_id
Required if using service account (Username and Password) to authenticate request.
12345
To Date
string
/ Required
to_date
The date in yyyy-mm-dd format to query to. This date is inclusive.
2022-01-01
Where
string
where
An expression to filter events by. More info on expression sequence structure can be found here: https://developer.mixpanel.com/reference/segmentation-expressions
properties['account_id'] in [1,2,3,4]

{
"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

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Data and Domain
string
/ Required
dataAndDomain
The server location to be used: * `data.mixpanel` - The default (US) servers used for most projects * `data-eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Events
string
Value List
events
000xxx
A whitelist for the event you intend to export. It is okay to pass this multiple times to whitelist multiple events.
event_name_1, event_name_2
Name
string
/ Required
name
The name that uniquely identifies the pipeline.
pipelineName
Project ID
string
project_id
Your project id (must be specified when using service account based authentication)
12345
Where
string
where
A selector expression used to filter by events data, such as event properties. Please note that after this update, the sync of older dates to your data warehouse (if enabled) will only contain events matching your new where clause.
properties['account_id'] in [1,2,3,4]

{
"data": null
}

Edit Generic Pipeline

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

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Data
string
data
The HTTP body payload to send to the URL.
{"exampleKey": "Example Data"}
Data and Domain
string
/ Required
dataAndDomain
The server location to be used: * `data.mixpanel` - The default (US) servers used for most projects * `data-eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Debug Request
boolean
debugRequest
false
Enabling this flag will log out the current request.
 
File Data
string
Key Value List
fileData
File Data to be sent as a multipart form upload.
[{key: "example.txt", value: "My File Contents"}]
File Data File Names
string
Key Value List
fileDataFileNames
File names to apply to the file data inputs. Keys must match the file data keys above.
 
Form Data
string
Key Value List
formData
The Form Data to be sent as a multipart form upload.
[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header
string
Key Value List
headers
A list of headers to send with the request.
User-Agent: curl/7.64.1
Max Retry Count
string
maxRetries
0
The maximum number of retries to attempt.
 
Method
string
/ Required
method
The HTTP method to use.
 
Name
string
/ Required
name
The name that uniquely identifies the pipeline.
pipelineName
Query Parameter
string
Key Value List
queryParams
A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
 
Response Type
string
/ Required
responseType
json
The type of data you expect in the response. You can request json, text, or binary data.
 
Retry On All Errors
boolean
retryAllErrors
false
If true, retries on all erroneous responses regardless of type.
 
Retry Delay (ms)
string
retryDelayMS
0
The delay in milliseconds between retries.
 
Timeout
string
timeout
The maximum time that a client will await a response to its request
2000
URL
string
/ Required
url
/nessie/pipeline/edit
The endpoint to send the request to. Defaults to /nessie/pipeline/edit.
/sobjects/Account
Use Exponential Backoff
boolean
useExponentialBackoff
false
Specifies whether to use a pre-defined exponential backoff strategy for retries.
 

Get Pipeline

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

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Data and Domain
string
/ Required
dataAndDomain
The server location to be used: * `data.mixpanel` - The default (US) servers used for most projects * `data-eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Name
string
/ Required
name
The name that uniquely identifies the pipeline.
pipelineName
Project ID
string
/ Required
project_id
Required if using service account (Username and Password) to authenticate request.
12345
Status
string
Value List
status
000xxx
Filters the tasks by the given status. Valid options for status are pending, running, retried, failed, canceled, and timed_out.
'pending', 'running', 'retried'
Summary
boolean
summary
Only lists task count by status and no details.
false

{
"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

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Events
code
/ Required
events
Each request ingests a batch of events into Mixpanel. We accept up to 2000 events and 2MB uncompressed per request. Events are part of the request body.
Project ID
string
project_id
Required if using service account (Username and Password) to authenticate request.
12345
Region
string
/ Required
region
The server location to be used: * `api` - The default (US) servers used for most projects * `api-eu` - EU servers if you are enrolled in EU Data Residency
 
Use Project Token
boolean
useProjectToken
Use the Connection project token to authenticate the request.
 

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

List Pipelines

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

InputNotesExample
Connection
connection
/ Required
connection
 
 
Data and Domain
string
/ Required
dataAndDomain
The server location to be used: * `data.mixpanel` - The default (US) servers used for most projects * `data-eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Project ID
string
/ Required
project_id
Required if using service account (Username and Password) to authenticate request.
12345

{
"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

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Project ID
string
/ Required
project_id
Required if using service account (Username and Password) to authenticate request.
12345
Region and Domain
string
/ Required
regionAndDomain
The server location to be used: * `mixpanel` - The default (US) servers used for most projects * `eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Use Project Token
boolean
useProjectToken
Use the Connection project token to authenticate the request.
 
Workspace ID
string
workspace_id
The id of the workspace if applicable.
12345

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

Query Funnel Saved Reports

Get data for a funnel. | key: queryFunnelSavedReports

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
From Date
string
/ Required
from_date
The date in yyyy-mm-dd format to begin querying from. This date is inclusive.
2022-01-01
Funnel ID
string
/ Required
funnel_id
The funnel that you wish to get data for.
12345
Interval
string
interval
The number of days you want each bucket to contain. The default value is 1.
1
Length
string
/ Required
length
The number of units (defined by length_unit) each user has to complete the funnel, starting from the time they triggered the first step in the funnel. May not be greater than 90 days. Note that we will query for events past the end of to_date to look for funnel completions. This defaults to the value that was previously saved in the UI for this funnel.
2022-01-01
Length Unit
string
length_unit
The unit applied to the length parameter can be 'second', 'minute', 'hour', or 'day'. Defaults to the value that was previously saved in the UI for this funnel.
seconds
Limit
string
limit
Return the top property values. Defaults to 255 if not explicitly included. Maximum value 10,000. This parameter does nothing if 'on' is not specified.
255
Interval
string
on
The property expression to segment the event on. See the expression to segment below. https://developer.mixpanel.com/reference/segmentation-expressions
properties['account_id'] in [1,2,3,4]
Project ID
string
project_id
Required if using service account (Username and Password) to authenticate request.
12345
Region and Domain
string
/ Required
regionAndDomain
The server location to be used: * `mixpanel` - The default (US) servers used for most projects * `eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
To Date
string
/ Required
to_date
The date in yyyy-mm-dd format to query to. This date is inclusive.
2022-01-01
Unit
string
unit
This is an alternate way of specifying interval and can be 'day', 'week', or 'month'.
month
Use Project Token
boolean
useProjectToken
Use the Connection project token to authenticate the request.
 
Where
string
where
An expression to filter events by. See the expression to segment below. https://developer.mixpanel.com/reference/segmentation-expressions
properties['account_id'] in [1,2,3,4]
Workspace ID
string
workspace_id
The id of the workspace if applicable.
12345

{
"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

InputNotesExample
Bookmark ID
string
/ Required
bookmark_id
The ID of your Insights report can be found from the url: https://mixpanel.com/report/1/insights#report/<YOUR_BOOKMARK_ID>/example-report
1234566
Connection
connection
/ Required
connection
 
 
Project ID
string
project_id
Required if using service account (Username and Password) to authenticate request.
12345
Region and Domain
string
/ Required
regionAndDomain
The server location to be used: * `mixpanel` - The default (US) servers used for most projects * `eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Workspace ID
string
workspace_id
The id of the workspace if applicable.
12345

{
"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

InputDefaultNotesExample
As Of Timestamp
string
as_of_timestamp
This parameter is only useful when also using behaviors. If you try to export more than 1k profiles using a behaviors parameter and you don't included the parameter as_of_timestamp, you'll see the following error: request for page in uncached query for params
123123232
Behaviors
string
behaviors
If you are exporting user profiles using an event selector, you use a behaviors parameter in your request. behaviors and filter_by_cohort are mutually exclusive.
2
Connection
connection
/ Required
connection
 
 
 
Distinct IDs
string
Value List
distinct_ids
000xxx
A unique identifier used to distinguish an individual profile. Could be an array of identifiers.
1234566
Filter By Cohort
string
filter_by_cohort
Takes a JSON object with a single key called id whose value is the cohort ID. behaviors and filter_by_cohort are mutually exclusive.
{'id':12345}
Include All Users
boolean
include_all_users
If set to true means that the Engage API will include distinct_ids that don't have a user profile. This is the default. If set to false, means that the Engage API will only include distinct_ids with user profiles. this parameter is only applied when combined with filter_by_cohort
false
Output Properties
string
Value List
output_properties
000xxx
A JSON array of names of properties you want returned. This parameter can drastically reduce the amount of data returned by the API when you're not interested in all properties and can speed up queries significantly.
'$last_name', '$email', 'Total Spent'
Page
string
page
Which page of the results to retrieve. Pages start at zero. If the 'page' parameter is provided, the session_id parameter must also be provided.
2
Project ID
string
/ Required
project_id
Required if using service account (Username and Password) to authenticate request.
12345
Region and Domain
string
/ Required
regionAndDomain
The server location to be used: * `mixpanel` - The default (US) servers used for most projects * `eu.mixpanel` - EU servers if you are enrolled in EU Data Residency
 
Session ID
string
session_id
A string id provided in the results of a previous query. Using a session_id speeds up api response, and allows paging through results.
12345
Where
string
where
An expression to filter users by. See the expressions section above. https://developer.mixpanel.com/reference/segmentation-expressions
properties['account_id'] in [1,2,3,4]
Workspace ID
string
workspace_id
The id of the workspace if applicable.
12345

{
"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

InputDefaultNotesExample
Base URL
string
/ Required
baseUrl
Input the base url you're going to hit. For example, https://api.mixpanel.com/ or https://api-eu.mixpanel.com/
https://api.mixpanel.com/
Connection
connection
/ Required
connection
 
 
 
Data
string
data
The HTTP body payload to send to the URL.
{"exampleKey": "Example Data"}
Debug Request
boolean
debugRequest
false
Enabling this flag will log out the current request.
 
File Data
string
Key Value List
fileData
File Data to be sent as a multipart form upload.
[{key: "example.txt", value: "My File Contents"}]
File Data File Names
string
Key Value List
fileDataFileNames
File names to apply to the file data inputs. Keys must match the file data keys above.
 
Form Data
string
Key Value List
formData
The Form Data to be sent as a multipart form upload.
[{"key": "Example Key", "value": new Buffer("Hello World")}]
Header
string
Key Value List
headers
A list of headers to send with the request.
User-Agent: curl/7.64.1
Max Retry Count
string
maxRetries
0
The maximum number of retries to attempt.
 
Method
string
/ Required
method
The HTTP method to use.
 
Query Parameter
string
Key Value List
queryParams
A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
 
Response Type
string
/ Required
responseType
json
The type of data you expect in the response. You can request json, text, or binary data.
 
Retry On All Errors
boolean
retryAllErrors
false
If true, retries on all erroneous responses regardless of type.
 
Retry Delay (ms)
string
retryDelayMS
0
The delay in milliseconds between retries.
 
Timeout
string
timeout
The maximum time that a client will await a response to its request
2000
URL
string
/ Required
url
Input the path only (/import), The base URL is going to defined in the previous input. For example, to connect to https://api.mixpanel.com/import, only /import is entered in this field and https://api.mixpanel.com/ is entered in the 'Base URL' field.
/import
Use Exponential Backoff
boolean
useExponentialBackoff
false
Specifies whether to use a pre-defined exponential backoff strategy for retries.
 

Track Events

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

InputDefaultNotesExample
Connection
connection
/ Required
connection
 
 
 
Events
code
/ Required
events
Each request ingests a batch of events into Mixpanel. We accept up to 2000 events and 2MB uncompressed per request. Events are part of the request body.
Img
string
img
If present and equal to 1, Mixpanel will serve a 1x1 transparent pixel image as a response to the request. This is useful for adding Pixel Tracking in places that javascript is not supported.
1
IP
string
ip
If present and equal to 1, Mixpanel will use the ip address of the incoming request and compute a distinct_id using a hash function if no distinct_id is provided. This is different from providing a properties.ip value in the Event Object.
1
Redirect
string
redirect
If present, Mixpanel will serve a redirect to the given url as a response to the request. This is useful to add link tracking in notifications.
https://exampleurl.com
Region
string
/ Required
region
The server location to be used: * `api` - The default (US) servers used for most projects * `api-eu` - EU servers if you are enrolled in EU Data Residency
 
Use Project Token
boolean
useProjectToken
Use the Connection project token to authenticate the request.
 
Verbose
string
verbose
If present and equal to 1, Mixpanel will respond with a JSON Object describing the success or failure of the tracking call. The returned object will have two keys: status, with the value 1 on success and 0 on failure, and error, with a string-valued error message if the request wasn't successful. This is useful for debugging during implementation.
1

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

Update Multiple Profiles

Send a batch of profile updates. | key: updateMultipleProfiles

InputNotesExample
Connection
connection
/ Required
connection
 
 
Properties To Update
code
/ Required
propertiesToUpdate
Send a batch of profile updates. Instead of sending a single JSON object as the data query parameter, send a JSON list of objects as the data parameter.
Redirect
string
redirect
If present, Mixpanel will serve a redirect to the given url as a response to the request. This is useful to add link tracking in notifications.
https://exampleurl.com
Region
string
/ Required
region
The server location to be used: * `api` - The default (US) servers used for most projects * `api-eu` - EU servers if you are enrolled in EU Data Residency
 
Verbose
string
verbose
If present and equal to 1, Mixpanel will respond with a JSON Object describing the success or failure of the tracking call. The returned object will have two keys: status, with the value 1 on success and 0 on failure, and error, with a string-valued error message if the request wasn't successful. This is useful for debugging during implementation.
1

{
"data": 1
}