mixpanel

v1.0.2
com.mcparmory/mixpanel Checked 3 days ago Published 6 months ago

Analyze user behavior with funnels, retention, cohorts, and event segmentation

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_insights_report Get Insights Report

Retrieve data from a saved Insights report in your Mixpanel project. Subject to a rate limit of 60 queries per hour with a maximum of 5 concurrent queries.

ParameterTypeDescription
bookmark_id *integerThe unique identifier of your Insights report, found in the Mixpanel URL path after 'report-' in the editor-card-id parameter.
project_id *integerThe Mixpanel project ID associated with your account.

get_funnel_data Get Funnel Data

Retrieve funnel conversion data for a specified date range and funnel. Results can be segmented by user properties and filtered by event criteria. Subject to a rate limit of 60 queries per hour with a maximum of 5 concurrent queries.

ParameterTypeDescription
from_date *stringThe start date for the query in YYYY-MM-DD format (inclusive).
funnel_id *integerThe ID of the funnel to retrieve data for.
project_id *integerThe Mixpanel project ID that contains the funnel.
to_date *stringThe end date for the query in YYYY-MM-DD format (inclusive).
lengthintegerThe time window for users to complete the funnel from when they trigger the first step. Maximum allowed is 90 days. If not specified, uses the value saved in the UI for this funnel.
length_unitstringThe unit of time for the length parameter: day, hour, minute, or second. If not specified, uses the value saved in the UI for this funnel.
limitintegerThe maximum number of top property values to return when segmenting. Defaults to 255 if not specified; maximum allowed is 10,000. This parameter has no effect if the 'on' parameter is not used.
onstringA property expression to segment funnel results by. When specified, results are grouped by the values of this property.
wherestringAn expression to filter which events are included in the funnel analysis. Only events matching this filter are considered.

list_saved_funnels List Saved Funnels

Retrieve a list of all saved funnels in your Mixpanel project, including their names and unique funnel identifiers.

ParameterTypeDescription
project_id *integerThe Mixpanel project ID associated with the funnels you want to retrieve.

get_retention_report Get Retention Report

Retrieve a retention analysis report for a Mixpanel project, measuring how users return to your product over time. Supports both first-time user retention (birth) and recurring user retention (compounded) with optional event and property filtering.

ParameterTypeDescription
from_date *stringStart date for the retention analysis period in YYYY-MM-DD format (e.g., 2024-01-15).
project_id *integerThe Mixpanel project ID to query retention data for.
to_date *stringEnd date for the retention analysis period in YYYY-MM-DD format (e.g., 2024-01-31).
eventstringOptional event name to analyze retention for (e.g., 'Viewed report'). If omitted, retention is calculated across all events.
interval_countintegerNumber of time intervals to return in the retention analysis; defaults to 1. The report includes a '0th' interval for events occurring within the first interval period.
limitintegerMaximum number of segmentation values to return in results. Only used when the 'on' parameter is specified for property-based segmentation.
onstringOptional property expression to segment the returning event by (e.g., properties["plan_type"]). Only applies when segmenting retention results.
retention_typestringRetention measurement type: 'birth' tracks first-time user retention, while 'compounded' tracks recurring retention. Defaults to 'birth' if not specified.
unbounded_retentionbooleanWhen enabled, retention values accumulate from right to left, so each interval includes users retained on that day and all subsequent days. Defaults to false for standard interval-by-interval counting…
wherestringOptional filter expression to segment the initial cohort by user properties (e.g., properties["$os"]=="Linux"). Uses Mixpanel expression syntax.

get_retention_frequency_report Get Retention Frequency Report

Retrieve a frequency report analyzing user retention and addiction patterns over a specified date range. Returns the distribution of returning user actions segmented by time unit and optional properties.

ParameterTypeDescription
addiction_unit *stringThe granularity at which to measure action frequency: hour or day.
from_date *stringStart date for the analysis period in YYYY-MM-DD format (inclusive).
project_id *integerThe Mixpanel project ID to query against.
to_date *stringEnd date for the analysis period in YYYY-MM-DD format (inclusive).
unit *stringThe time period granularity for the overall report: day, week, or month.
eventstringThe specific event name to analyze for returning user counts. If omitted, analyzes all events.
limitintegerMaximum number of segmentation values to return when segmenting by the 'on' property. Has no effect if 'on' is not specified.
onstringA property expression to segment results by. When specified, the report breaks down metrics by distinct values of this property. Supports nested properties as documented in segmentation expressions.
wherestringA filter expression to narrow the returning events analyzed. Supports property-based conditions and logical operators as documented in segmentation expressions.

get_segmented_event_data Get Segmented Event Data

Retrieve event data segmented and filtered by properties from your Mixpanel project. Results can be broken down by a specific property dimension and filtered by event criteria.

ParameterTypeDescription
event *stringThe name of the event to query. Specify a single event name, not multiple events.
from_date *stringQuery start date in YYYY-MM-DD format (inclusive).
project_id *integerYour Mixpanel project identifier (numeric ID).
to_date *stringQuery end date in YYYY-MM-DD format (inclusive).
formatstringOptional output format. Set to 'csv' for comma-separated values; omit for default JSON format.
limitintegerMaximum number of top property values to return (defaults to 60, maximum 10,000). Only applies when segmenting with the 'on' parameter.
onstringOptional property expression to segment results by. Omit to get aggregate counts without segmentation. See segmentation expressions documentation for syntax.
wherestringOptional filter expression to narrow events by property values. See segmentation expressions documentation for syntax.

get_event_segmentation_by_numeric_buckets Get Event Segmentation by Numeric Buckets

Retrieve event data segmented into numeric buckets based on a numeric property value. Results are filtered by the specified date range and optional event properties.

ParameterTypeDescription
event *stringThe name of the event to analyze. Specify a single event name, not multiple events.
from_date *stringThe start date for the query range in YYYY-MM-DD format (inclusive).
on *stringA numeric property expression to segment the event data into buckets. The property must contain numeric values.
project_id *integerThe Mixpanel project ID to query.
to_date *stringThe end date for the query range in YYYY-MM-DD format (inclusive).
wherestringAn optional property expression to filter which events are included in the results. Only events matching this filter will be segmented.

get_event_sum_by_time Get Event Sum by Time

Calculate the sum of a numeric expression for a specified event aggregated over time. Results are broken down by unit time periods within the requested date range.

ParameterTypeDescription
event *stringThe name of the event to analyze. Provide a single event name, not multiple events.
from_date *stringThe start date for the query in YYYY-MM-DD format (inclusive).
on *stringA numeric expression to sum for each time unit. Non-numeric expression results are treated as 0.0. Use Mixpanel expression syntax to reference event properties and perform calculations.
project_id *integerThe Mixpanel project ID to query.
to_date *stringThe end date for the query in YYYY-MM-DD format (inclusive).
wherestringOptional filter expression to narrow results to specific events. Use Mixpanel expression syntax to define conditions on event properties.

get_event_average Get Event Average

Calculate the average value of a numeric expression across events within a specified date range. Results are aggregated per unit time for trend analysis.

ParameterTypeDescription
event *stringThe name of the event to analyze. Provide a single event name, not multiple events.
from_date *stringThe start date for the query range in YYYY-MM-DD format (inclusive).
on *stringA numeric expression to average per unit time. Non-numeric expression results are treated as 0.0. Refer to the expressions documentation for valid syntax.
project_id *integerThe Mixpanel project ID to query.
to_date *stringThe end date for the query range in YYYY-MM-DD format (inclusive).
wherestringOptional filter expression to narrow events by specific criteria. Refer to the expressions documentation for valid syntax.

get_activity_stream_for_users Get Activity Stream for Users

Retrieve the activity feed for specified users within a date range. Subject to a rate limit of 60 queries per hour with a maximum of 5 concurrent queries.

ParameterTypeDescription
distinct_ids *stringA JSON array (as a string) of distinct user IDs for which to return activity feeds. Each ID should be a valid distinct_id from your Mixpanel project.
from_date *stringThe start date for the activity query in YYYY-MM-DD format (inclusive).
project_id *integerThe Mixpanel project ID that identifies which project to query.
to_date *stringThe end date for the activity query in YYYY-MM-DD format (inclusive).

list_cohorts List Cohorts

Retrieve all saved cohorts in a Mixpanel project, including metadata such as name, ID, user count, description, creation date, and visibility settings. Use the /engage endpoint with filter_by_cohort to retrieve the actual users within a cohort.

ParameterTypeDescription
project_id *integerThe numeric identifier for your Mixpanel project.

query_profiles Query Profiles

Query user or group profiles from a Mixpanel project with optional filtering, property selection, and cohort-based retrieval to retrieve detailed profile data.

ParameterTypeDescription
project_id *integerThe Mixpanel project ID to query profiles from. Required to identify which project's data to access.
as_of_timestampintegerA Unix timestamp specifying the point-in-time snapshot for profile data. Required when exporting more than 1,000 profiles with behavior filters to avoid caching errors.
data_group_idstringThe group key ID for querying group profiles instead of user profiles. Required when analyzing group-level analytics data rather than individual users.
distinct_idsstringA JSON array of distinct IDs to retrieve profiles for. When provided, limits results to only these specific user or group identifiers.
filter_by_cohortstringA JSON object with an `id` key containing a cohort ID to filter profiles by cohort membership. Mutually exclusive with behavior-based filtering.
include_all_usersbooleanWhen using cohort filtering, set to `true` (default) to include all distinct IDs even without profiles, or `false` to return only IDs with existing profiles.
output_propertiesarrayA JSON array of property names to include in the response. Restricting to needed properties significantly reduces data transfer and improves query performance.
wherestringA filter expression to narrow results by profile properties or attributes. Supports complex conditions to target specific user or group segments.

get_event_aggregates Get Event Aggregates

Retrieve aggregated event data (counts, unique users, or averages) for specified events over a time period. Results can be broken down by minute, hour, day, week, or month granularity.

ParameterTypeDescription
event *stringOne or more event names to analyze, provided as a JSON array of strings (e.g., ["play song", "log in"]).
from_date *stringThe start date for the query range in YYYY-MM-DD format (inclusive).
project_id *integerThe Mixpanel project ID to query.
to_date *stringThe end date for the query range in YYYY-MM-DD format (inclusive).
type *stringThe type of aggregation to perform: 'general' for total event counts, 'unique' for distinct user counts, or 'average' for mean values per time unit.
unit *stringThe time granularity for bucketing results: 'minute', 'hour', 'day', 'week', or 'month'. Note that hourly granularity is not available for unique user counts.
formatstringThe response format: 'json' (default) or 'csv'. Subject to rate limits of 60 queries per hour and 5 concurrent queries.

list_top_events List Top Events

Retrieve today's top events ranked by frequency, including event counts and normalized percent change compared to yesterday.

ParameterTypeDescription
project_id *integerThe Mixpanel project ID to query events for.
type *stringThe type of event analysis to perform: 'general' for event frequency, 'unique' for unique user counts, or 'average' for average event values.
limitintegerMaximum number of events to return in the results. Defaults to 100 if not specified.

list_top_event_names List Top Event Names

Retrieve the most frequently occurring events from the past 31 days, analyzed by the specified metric type. Useful for understanding user behavior patterns and identifying key interactions in your product.

ParameterTypeDescription
project_id *integerThe Mixpanel project ID that identifies which project's event data to query.
type *stringThe type of event analysis to perform: 'general' for event frequency, 'unique' for distinct user counts, or 'average' for per-user averages.
limitintegerMaximum number of top events to return in the results, up to 255. Defaults to 255 if not specified.

get_event_property_aggregates Get Event Property Aggregates

Retrieve aggregated metrics for a specific event property over a time period, supporting analysis types like total counts, unique values, or averages at various time granularities (minute through month).

ParameterTypeDescription
event *stringThe name of the event to analyze. Provide a single event name, not multiple events.
from_date *stringThe start date for the analysis period in YYYY-MM-DD format (inclusive).
name *stringThe property name within the event whose values you want to aggregate.
project_id *integerThe Mixpanel project ID to query.
to_date *stringThe end date for the analysis period in YYYY-MM-DD format (inclusive).
type *stringThe type of aggregation to perform: 'general' for total event counts, 'unique' for distinct value counts, or 'average' for mean values.
unit *stringThe time bucket granularity for results: 'minute', 'hour', 'day', 'week', or 'month'. Note that hourly granularity is not available for unique analysis.
formatstringThe response format: 'json' (default) or 'csv'.
limitintegerMaximum number of property values to return in results. Defaults to 255 if not specified.
valuesarrayOptional filter to analyze only specific property values. Provide as a JSON array of strings (e.g., ["value1", "value2"]). If omitted, all values are included.

list_top_event_properties List Top Event Properties

Retrieve the most frequently used property names for a specified event in your Mixpanel project. Useful for understanding which properties are most relevant to an event's analysis.

ParameterTypeDescription
event *stringThe name of the event to retrieve properties for. Provide a single event name, not multiple events.
project_id *integerThe Mixpanel project ID that contains the event you want to analyze.
limitintegerThe maximum number of top properties to return in the results. Defaults to 10 if not specified.

list_event_property_top_values List Event Property Top Values

Retrieve the most frequently occurring values for a specific event property in Mixpanel. Useful for understanding the distribution and cardinality of property values within an event.

ParameterTypeDescription
event *stringThe name of the event to analyze. Provide a single event name (not multiple events).
name *stringThe property name within the event whose top values you want to retrieve.
project_id *integerThe Mixpanel project ID that contains the event data you want to query.
limitintegerThe maximum number of top values to return in the response. Defaults to 255 if not specified.

execute_jql_script Execute JQL Script

Execute a custom JQL script against a Mixpanel project to query and aggregate event data. The script receives optional parameters and returns results based on the defined aggregation logic.

ParameterTypeDescription
project_id *integerThe numeric identifier for the Mixpanel project where the script will execute.
script *stringA JavaScript function that processes events using the Mixpanel JQL API. The function receives a params object and must return aggregated event data. Typically groups events by specified dimensions and…
paramsstringA JSON object containing custom variables and configuration values made available to the script as the global params variable. Allows parameterization of script logic without modifying the script itse…