Mixpanel
mixpanelMixpanel is a product analytics platform tracking user interactions and engagement, providing cohort analysis, funnels, and A/B testing to improve user experiences
Acciones disponibles (21)
Cada acción es una operación que el agente puede ejecutar contra este conector. Haz clic en una acción para ver sus parámetros.
Get Aggregated Event Property ValuesMIXPANEL_AGGREGATED_EVENT_PROPERTY_VALUESAcciónGet unique, total, or average data for a single event and property over days, weeks, or months. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_AGGREGATED_EVENT_PROPERTY_VALUESAcciónGet unique, total, or average data for a single event and property over days, weeks, or months. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
namestringObligatorioThe name of the property you would like to get data for
typestringObligatorioThe analysis type you would like to get data for
unitstringObligatorioThe level of granularity of the data
eventstringObligatorioThe event that you wish to get data for. Note: this is a single event name, not an array
limitintegerThe maximum number of values to return
formatstringThe data return format
valuesstring[]The specific property values that you would like to get data for. Example: ['female', 'unknown']
to_datestringThe date in yyyy-mm-dd format to query to (inclusive)
intervalintegerThe number of units to return data for. Specify either interval or from_date and to_date
from_datestringThe date in yyyy-mm-dd format to begin querying from (inclusive)
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataobjectObligatorioThe response data containing series and values
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
legend_sizeintegerObligatorioSize of the legend
Get Aggregate Event CountsMIXPANEL_AGGREGATE_EVENT_COUNTSAcciónGet aggregate event counts over time. supports different types of aggregation: general, unique, average, sum.
MIXPANEL_AGGREGATE_EVENT_COUNTSAcciónGet aggregate event counts over time. supports different types of aggregation: general, unique, average, sum.
Parámetros de entrada
typestringType of aggregation
unitstringTime unit for grouping results
eventstringName of the event to analyze
wherestringExpression to filter events
eventsstring[]List of event names to analyze
to_datestringObligatoriodateEnd date for the query (inclusive)
intervalintegerTime interval for the results in seconds
from_datestringObligatoriodateStart date for the query (inclusive)
project_idintegerObligatorioThe ID of the project to query
workspace_idintegerThe ID of the workspace if applicable
Parámetros de salida
dataobjectObligatorioRaw event count data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get Aggregate EventsMIXPANEL_AGGREGATE_EVENTSAcciónGet aggregate event counts over time. supports different types of aggregation: general, unique, average, sum.
MIXPANEL_AGGREGATE_EVENTSAcciónGet aggregate event counts over time. supports different types of aggregation: general, unique, average, sum.
Parámetros de entrada
typestringType of aggregation
unitstringTime unit for grouping results
eventstringName of the event to analyze
limitintegerMaximum number of results to return
wherestringExpression to filter events
eventsstring[]List of event names to analyze
to_datestringObligatoriodateEnd date for the query (inclusive)
intervalintegerTime interval for the results in seconds
from_datestringObligatoriodateStart date for the query (inclusive)
project_idintegerObligatorioThe ID of the project to query
workspace_idintegerThe ID of the workspace if applicable
Parámetros de salida
dataobjectObligatorioRaw event breakdown data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get All ProjectsMIXPANEL_GET_ALL_PROJECTSAcciónGet all projects associated with the authenticated mixpanel account. returns project details including name, permissions, role, domain, and other configuration details.
MIXPANEL_GET_ALL_PROJECTSAcciónGet all projects associated with the authenticated mixpanel account. returns project details including name, permissions, role, domain, and other configuration details.
Parámetros de entrada
Sin parámetros.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Execute JQL QueryMIXPANEL_JQL_QUERYAcciónExecute a custom jql (javascript query language) query against mixpanel's query api. key constraints: - 60 queries/hour, max 5 concurrent queries. - 2-minute execution timeout. - 5 gb data processing limit, 2 gb output limit. - no remote network requests (xmlhttprequest) are allowed inside the jql script.
MIXPANEL_JQL_QUERYAcciónExecute a custom jql (javascript query language) query against mixpanel's query api. key constraints: - 60 queries/hour, max 5 concurrent queries. - 2-minute execution timeout. - 5 gb data processing limit, 2 gb output limit. - no remote network requests (xmlhttprequest) are allowed inside the jql script.
Parámetros de entrada
paramsobjectA JSON-encoded object that will be made available in the script as `params`. Use this to pass dynamic date ranges, event names, or other parameters into your JQL query.
scriptstringObligatorioA **fully valid** JavaScript code snippet that defines **`function main() { ... }`** and returns the final dataset. The script is compiled and executed by Mixpanel's JQL engine. -------------------------------------------------------------------------------------------- ### **COMPLETE JQL REFERENCE** JQL (JavaScript Query Language) allows you to query Mixpanel's raw event or user (profile) data using standard JavaScript transformations. Below is a comprehensive reference to help you generate queries, including how to: - **Fetch event data** with `Events()`. - **Fetch user profiles** with `People()`. - **Join** events and profiles with `join()`. - Apply **filters**, **mappers**, and **reducers** (aggregations) with `.filter()`, `.map()`, `.reduce()`, etc. - Group results with `.groupBy()` or `.groupByUser()`. - Use built-in reducers like `count()`, `sum()`, `avg()`, etc. - Pass dynamic parameters via the `params` object. Your script must have **exactly** one top-level function named `main()`. For example: ```js function main() { // 1) Fetch a data source (Events, People, or join(...)). // 2) Transform/aggregate as needed. // 3) Return the final results. } ``` -------------------------------------------------------------------------------------------- ## **DATA SOURCES** 1. **Events(params)** - Fetch raw event data. Each event object typically has: - `name`: The event name (string). - `distinct_id`: The user's distinct ID. - `time`: Timestamp in milliseconds since epoch (project timezone, not UTC). - `properties`: An object with all event properties. - **Common arguments** to `Events()`: ```js Events({ from_date: "YYYY-MM-DD", to_date: "YYYY-MM-DD", event_selectors: [ { event: "EventName", selector: "properties[\"country\"] == \"US\"", label: "Custom Label" // optional label } ] // user_selectors can also be used in People() if needed. }) ``` - The `selector` field supports **Segmentation Expressions**, e.g.: `"properties[\"app_name\"] == \"gmail\" and properties[\"some_flag\"] == true"`. 2. **People(params)** - Fetch user profiles. Each user object has: - `distinct_id`: The user's unique ID. - `time`: Timestamp of the most recent update. - `last_seen`: Timestamp of the most recent profile Set() call. - `properties`: An object of user properties (e.g. `signup_date`, `email`, `country`, etc.). - **Example**: ```js People({ user_selectors: [ { selector: "user[\"$email\"] == \"someone@example.com\"" } ] }) // or People() .filter(u => u.properties.age > 30); ``` 3. **join(Events(...), People(...), { type, selectors })** - Combine events with user profiles on the same `distinct_id`. - Each joined item has `{ distinct_id, event, user }`, where `event` is an event object and `user` is a user object. - **type** can be `full`, `left`, `right`, or `inner` (defaults to `full`). - You can use selectors referencing **both** event & user properties. ```js join( Events({ from_date: '2023-01-01', to_date: '2023-01-31' }), People(), { type: 'inner', selectors: [ { selector: 'properties[\"country\"] == "US" and user[\"age\"] > 30' } ] } ) ``` -------------------------------------------------------------------------------------------- ## **TRANSFORMATIONS** (Methods that process collections) After fetching a data source, you can chain transformations. The final result of your chain is what you `return` in `main()`. 1. **filter(fn)**: - Keep only items for which `fn(item)` is `true`. - Example: ```js .filter(e => e.name === "Sign Up" && e.properties.country === "US") ``` 2. **map(fn)**: - Transform each item in the collection. - Example: ```js .map(e => { return { originalEventName: e.name, city: e.properties.$city }; }) ``` 3. **reduce(reducerFn)**: - Aggregates the entire collection into **one** value. - Built-in reducers exist (see below), or you can write a custom function with signature `(accumulators, items) => { ... }`. 4. **groupBy(keys, reducer)**: - Group items by the specified keys, then apply a reducer to each group. - Returns an array of objects in the form: ```js [ { key: [...], value: <reduced result> }, ... ] ``` - **Keys** can be property paths like `'properties.$city'` or a function `(item) => item.name`. - Example: ```js .groupBy([ "properties.country", "properties.browser" ], mixpanel.reducer.count()) ``` 5. **groupByUser([optionalKeys], reducer)**: - Similar to `groupBy`, but automatically groups all events for each user (`distinct_id`) **in chronological order**. - Allows analysis of user event sequences, e.g., finding the next event after a `login`. - The reducer function's signature is `(state, events) => { ... }` where `state` is the previously returned value. - Example: ```js .groupByUser([], function(state, events){ // examine event sequence... // return an updated state. }); ``` 6. **sortAsc(accessor)** / **sortDesc(accessor)**: - Sort the collection by an accessor property or function. - Example: ```js .sortDesc("value") ``` 7. **flatten()**: - Flattens arrays inside the collection into individual items. -------------------------------------------------------------------------------------------- ## **BUILT-IN REDUCERS** Reducers turn multiple items into a single value (for `.reduce()` or per-group in `.groupBy()`). Some commonly used: 1. **mixpanel.reducer.count()** - Count the number of items. 2. **mixpanel.reducer.sum(accessor)** / **mixpanel.reducer.avg(accessor)** - Sum or average numeric values. `accessor` can be a property string (e.g. 'properties.price') or a function. 3. **mixpanel.reducer.min(accessor)** / **mixpanel.reducer.max(accessor)** - The min or max numeric value in a collection. 4. **mixpanel.reducer.min_by(accessor)** / **max_by(accessor)** - Returns the item with the smallest/largest numeric accessor value. 5. **mixpanel.reducer.numeric_percentiles(accessor, [p1, p2, ...])** - Approximate percentile values (e.g., 50th, 90th, etc.) 6. **mixpanel.reducer.top(N)** - Returns the top N items by numeric `value`. 7. **mixpanel.reducer.any()** / **mixpanel.reducer.null()** / **mixpanel.reducer.object_merge()** - `any()`: Returns any one item. - `null()`: Always returns null. - `object_merge()`: Merge multiple objects by summing numeric fields. -------------------------------------------------------------------------------------------- ## **SEGMENTATION EXPRESSIONS** When using `event_selectors` or `user_selectors`, or the optional `selectors` in `join()`, you can supply **Segmentation Expressions** to filter by properties. Common operators: - `==`, `!=`, `>`, `>=`, `<`, `<=`, `in`, `and`, `or`, `not` - Typecasts: `string(...)`, `number(...)`, `boolean(...)` - Example: `properties["app_name"] == "gmail" and user["age"] > 30` -------------------------------------------------------------------------------------------- ## **PARAMS** You can pass a `params` object to the script. It's accessible inside `main()` via the global `params` variable. For example: ```js function main() { return Events({ from_date: params.start_date, to_date: params.end_date, event_selectors: [{ event: params.eventName }] }); } ``` This makes your query reusable for different date ranges or event names. -------------------------------------------------------------------------------------------- ## **EXAMPLES** 1. **All events named 'SERVER_EXECUTE_ACTION_END' from last 7 days, filtering on `app_name=gmail`:** ```js function main() { var now = new Date().getTime(); var sevenDaysAgo = now - (7 * 24 * 60 * 60 * 1000); return Events() .filter(e => e.name === 'SERVER_EXECUTE_ACTION_END' && e.properties.app_name === 'gmail' && e.time >= sevenDaysAgo); } ``` 2. **Getting user profiles who signed up in 2024** ```js function main() { return People() .filter(u => { var signup = new Date(u.properties.signup_date); return signup.getFullYear() === 2024; }); } ``` 3. **Join users and events (inner join) for a date range, filter by US users over age 30, then group by event name** ```js function main() { return join( Events({ from_date: '2024-01-01', to_date: '2024-01-31' }), People(), { type: 'inner', selectors: [ { selector: 'properties[\"country\"] == "US" and user[\"age\"] > 30' } ] } ) .filter(tuple => tuple.event) .groupBy([ev => ev.event.name], mixpanel.reducer.count()); } ``` 4. **Counting events by user using `groupByUser`** ```js function main() { return Events({ from_date: params.start_date, to_date: params.end_date }) .groupByUser(function(state, events) { // 'state' is the accumulator for this user; 'events' is the next chunk (in time order) state = state || 0; // init state if undefined return state + events.length; // increment by number of events in this chunk }); } ``` 5. **Combining transformations** ```js function main() { return Events({ from_date: '2025-01-01', to_date: '2025-01-31', event_selectors: [{ event: 'purchase' }] }) .filter(e => e.properties.country === 'CA') .map(e => e.properties.amount) .reduce(mixpanel.reducer.sum()); } ``` -------------------------------------------------------------------------------------------- ### **IMPORTANT**: The final result returned by `main()` must be your final data. You can return: - An array or list of objects. - A single number (if you used `.reduce()` to a numeric total). - A nested array if you used `.groupBy(...)`. -------------------------------------------------------------------------------------------- **Include `function main() { ... }` in its entirety** in this field. This ensures the Mixpanel JQL engine runs your code.
project_idintegerObligatorioRequired if using service account credentials or an API secret for authentication.
workspace_idintegerThe ID of the Mixpanel workspace, if applicable.
Parámetros de salida
dataanyObligatorioThe raw data (JSON) returned by Mixpanel after running your JQL script.
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
List Saved CohortsMIXPANEL_LIST_COHORTSAcciónGet list of all cohorts in a mixpanel project. returns cohort details including name, id, count, description, creation date, and visibility. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_LIST_COHORTSAcciónGet list of all cohorts in a mixpanel project. returns cohort details including name, id, count, description, creation date, and visibility. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
project_idintegerObligatorioThe ID of the project to query. Required if using service account authentication.
workspace_idintegerThe ID of the workspace if applicable
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
List Saved FunnelsMIXPANEL_LIST_FUNNELSAcciónGet the names and funnel ids of your funnels. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_LIST_FUNNELSAcciónGet the names and funnel ids of your funnels. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataobject[]ObligatorioArray of funnel information
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get Profile Event ActivityMIXPANEL_PROFILE_EVENT_ACTIVITYAcciónGet event activity feed for specified users from mixpanel query api. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_PROFILE_EVENT_ACTIVITYAcciónGet event activity feed for specified users from mixpanel query api. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
to_datestringObligatoriodateEnd date for the query (inclusive, format: YYYY-MM-DD)
from_datestringObligatoriodateStart date for the query (inclusive, format: YYYY-MM-DD)
project_idintegerObligatorioThe ID of the project to query. Required if using service account authentication.
distinct_idsstring[]ObligatorioList of distinct_ids to return activity feeds for
workspace_idintegerThe ID of the workspace if applicable
Parámetros de salida
dataobjectObligatorioRaw query results data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Query Frequency ReportMIXPANEL_QUERY_FREQUENCY_REPORTAcciónGet data about how frequently users are performing events. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries. example response with unit="day" and addiction unit="hour": { "2012-01-01": [305, 107, 60, 41, ...], # users who did event in 1+ hours, 2+ hours, etc. "2012-01-02": [495, 204, 117, 77, ...], "2012-01-03": [671, 324, 176, 122, ...] }
MIXPANEL_QUERY_FREQUENCY_REPORTAcciónGet data about how frequently users are performing events. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries. example response with unit="day" and addiction unit="hour": { "2012-01-01": [305, 107, 60, 41, ...], # users who did event in 1+ hours, 2+ hours, etc. "2012-01-02": [495, 204, 117, 77, ...], "2012-01-03": [671, 324, 176, 122, ...] }
Parámetros de entrada
onstringThe property expression to segment the second event on
unitstringObligatorioThe overall time period to return frequency of actions for
eventstringThe event to generate returning counts for
limitintegerReturn the top limit segmentation values
wherestringAn expression to filter the returning events by
to_datestringObligatorioThe date in yyyy-mm-dd format to query to (inclusive)
from_datestringObligatorioThe date in yyyy-mm-dd format to begin querying from (inclusive)
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
addiction_unitstringObligatorioThe granularity to return frequency of actions at
Parámetros de salida
dataobjectObligatorioThe frequency data
errorstringError if any occurred during the execution of the action
metadataobjectObligatorioMetadata about the query
successfulbooleanObligatorioWhether or not the action execution was successful or not
computed_atstringObligatorioTimestamp when the data was computed
Query Saved FunnelMIXPANEL_QUERY_FUNNELAcciónGet data for a funnel. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_QUERY_FUNNELAcciónGet data for a funnel. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
onstringThe property expression to segment the event on
unitstringAlternate way of specifying interval
limitintegerReturn the top property values. Maximum value 10,000
wherestringAn expression to filter events by
lengthintegerThe number of units each user has to complete the funnel. May not be greater than 90 days
to_datestringObligatorioThe date in yyyy-mm-dd format to query to (inclusive)
intervalintegerThe number of days you want each bucket to contain
from_datestringObligatorioThe date in yyyy-mm-dd format to begin querying from (inclusive)
funnel_idintegerObligatorioThe funnel that you wish to get data for
project_idintegerObligatorioRequired if using service account to authenticate request
length_unitstringThe unit applied to the length parameter
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataobjectObligatorioRaw funnel query data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Query Saved InsightMIXPANEL_QUERY_INSIGHTAcciónGet data from your insights reports. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_QUERY_INSIGHTAcciónGet data from your insights reports. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
project_idintegerObligatorioRequired if using service account to authenticate request
bookmark_idintegerObligatorioThe ID of your Insights report
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataobjectObligatorioRaw insight query data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Query Numeric Average ReportMIXPANEL_QUERY_NUMERIC_AVERAGEAcciónAverages an expression for events per unit time. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries. example response: { "status": "ok", "results": { "2024-01-01": 25.5, "2024-01-02": 32.75, "2024-01-03": 28.25 } }
MIXPANEL_QUERY_NUMERIC_AVERAGEAcciónAverages an expression for events per unit time. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries. example response: { "status": "ok", "results": { "2024-01-01": 25.5, "2024-01-02": 32.75, "2024-01-03": 28.25 } }
Parámetros de entrada
onstringObligatorioThe numeric expression to average per unit time (should evaluate to a number)
unitstringThe time unit for bucketing values
eventstringObligatorioThe event to get data for (single event name)
wherestringAn expression to filter events by
to_datestringObligatorioThe date in yyyy-mm-dd format to query to (inclusive)
from_datestringObligatorioThe date in yyyy-mm-dd format to begin querying from (inclusive)
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Query Numeric Segmentation ReportMIXPANEL_QUERY_NUMERIC_SEGMENTATIONAcciónGet data for an event, segmented and filtered by properties, with values placed into numeric buckets. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_QUERY_NUMERIC_SEGMENTATIONAcciónGet data for an event, segmented and filtered by properties, with values placed into numeric buckets. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
onstringObligatorioThe numeric property expression to segment the event on
typestringThe time unit for bucketing values
unitstringThe time unit for bucketing property values
eventstringObligatorioThe event to get data for (single event name)
wherestringAn expression to filter events by
to_datestringObligatorioThe date in yyyy-mm-dd format to query to (inclusive)
from_datestringObligatorioThe date in yyyy-mm-dd format to begin querying from (inclusive)
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataobjectObligatorioRaw numeric segmentation query data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Query Numeric Sum ReportMIXPANEL_QUERY_NUMERIC_SUMAcciónSums an expression for events per unit time. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries. example response: { "status": "ok", "computed at": "2024-01-20t12:00:00", "results": { "2024-01-01": 150.5, "2024-01-02": 245.75, "2024-01-03": 198.25 } }
MIXPANEL_QUERY_NUMERIC_SUMAcciónSums an expression for events per unit time. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries. example response: { "status": "ok", "computed at": "2024-01-20t12:00:00", "results": { "2024-01-01": 150.5, "2024-01-02": 245.75, "2024-01-03": 198.25 } }
Parámetros de entrada
onstringObligatorioThe numeric expression to sum per unit time (should evaluate to a number)
unitstringThe time unit for bucketing values
eventstringObligatorioThe event to get data for (single event name)
wherestringAn expression to filter events by
to_datestringObligatorioThe date in yyyy-mm-dd format to query to (inclusive)
from_datestringObligatorioThe date in yyyy-mm-dd format to begin querying from (inclusive)
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataobjectObligatorioRaw numeric sum query data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Query ProfilesMIXPANEL_QUERY_PROFILESAcciónQuery user or group profile data from mixpanel. returns list of profiles that match specified parameters. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_QUERY_PROFILESAcciónQuery user or group profile data from mixpanel. returns list of profiles that match specified parameters. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
pageintegerWhich page of results to retrieve (starts at 0)
wherestringAn expression to filter users (or groups) by
behaviorsintegerRequired when using event selector for user profiles
project_idintegerObligatorioThe ID of the project to query. Required if using service account authentication.
session_idstringSession ID from a previous query for pagination
distinct_idstringA unique identifier used to distinguish an individual profile
distinct_idsstring[]A list of distinct_ids to retrieve profiles for
workspace_idintegerThe ID of the workspace if applicable
data_group_idstringThe ID of the group key, used when querying group profiles
as_of_timestampintegerUsed with behaviors parameter for large exports
filter_by_cohortobjectFilter by cohort ID. Example: {'id': 12345}
include_all_usersbooleanWhen using filter_by_cohort, whether to include all distinct_ids even without profiles
output_propertiesstring[]List of property names to return in the response
Parámetros de salida
dataobjectObligatorioRaw query results data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Query Retention ReportMIXPANEL_QUERY_RETENTION_REPORTAcciónGet cohort analysis data. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_QUERY_RETENTION_REPORTAcciónGet cohort analysis data. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
onstringThe property expression to segment the second event on
unitstringThe interval unit
eventstringThe event to generate returning counts for
limitintegerReturn the top limit segmentation values
wherestringAn expression to filter events by
to_datestringObligatorioThe date in yyyy-mm-dd format to query to (inclusive)
intervalintegerThe number of units per individual bucketed interval
from_datestringObligatorioThe date in yyyy-mm-dd format to begin querying from (inclusive)
born_eventstringThe first event a user must do to be counted in a birth retention cohort
born_wherestringAn expression to filter born_events by
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
interval_countintegerThe number of individual buckets that are returned
retention_typestringType of retention analysis
unbounded_retentionbooleanWhether retention values accumulate from right to left
Parámetros de salida
dataobjectObligatorioRaw retention query data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Query Segmentation ReportMIXPANEL_QUERY_SEGMENTATIONAcciónGet data for an event, segmented and filtered by properties. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_QUERY_SEGMENTATIONAcciónGet data for an event, segmented and filtered by properties. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
onstringThe property expression to segment the event on
typestringType of count to return
unitstringThe time unit for bucketing property values
eventstringObligatorioThe event to get data for (single event name)
limitintegerReturn the top N property values (max 10000)
wherestringAn expression to filter events by
to_datestringObligatorioThe date in yyyy-mm-dd format to query to (inclusive)
intervalintegerNumber of days to bucket results into (used with type != 'general')
from_datestringObligatorioThe date in yyyy-mm-dd format to begin querying from (inclusive)
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataobjectObligatorioRaw segmentation query data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get Today's Top EventsMIXPANEL_TODAYS_TOP_EVENTSAcciónGet the top events for today, with their counts and the normalized percent change from yesterday. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_TODAYS_TOP_EVENTSAcciónGet the top events for today, with their counts and the normalized percent change from yesterday. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
typestringObligatorioThe analysis type you would like to get data for - such as general, unique, or average events
limitintegerThe maximum number of events to return
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataobjectObligatorioRaw top events data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get Top Event PropertiesMIXPANEL_TOP_EVENT_PROPERTIESAcciónGet the top property names for an event. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_TOP_EVENT_PROPERTIESAcciónGet the top property names for an event. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
eventstringObligatorioThe event that you wish to get data for. Note: this is a single event name, not an array
limitintegerThe maximum number of properties to return
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataobjectObligatorioRaw top event properties data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get Top Event Property ValuesMIXPANEL_TOP_EVENT_PROPERTY_VALUESAcciónGet the top values for a property. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_TOP_EVENT_PROPERTY_VALUESAcciónGet the top values for a property. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
namestringObligatorioThe name of the property you would like to get data for
eventstringObligatorioThe event that you wish to get data for. Note: this is a single event name, not an array
limitintegerThe maximum number of values to return
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataarrayObligatorioRaw top event property values data as a list
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get Top EventsMIXPANEL_TOP_EVENTSAcciónGet a list of the most common events over the last 31 days. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
MIXPANEL_TOP_EVENTSAcciónGet a list of the most common events over the last 31 days. the query api has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries.
Parámetros de entrada
typestringObligatorioThe analysis type you would like to get data for - such as general, unique, or average events
limitintegerThe maximum number of values to return
project_idintegerObligatorioRequired if using service account to authenticate request
workspace_idintegerThe id of the workspace if applicable
Parámetros de salida
dataarrayObligatorioRaw top events data
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not