> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modulex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Mixpanel Integration for AI Agents & Workflows

> Product analytics platform for tracking user events and behaviors

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/mixpanel.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=2c75d00b3dd30d44a84293d05d8b3df9" alt="Mixpanel logo" width="72" height="72" data-path="logos/mixpanel.svg" />

## Overview

Add **Mixpanel** to any ModuleX agent or workflow. Product analytics platform for tracking user events and behaviors via the Mixpanel Track API (`api.mixpanel.com`).

<Info>
  **Categories**: Analytics & Data · Analytics · Product Analytics · **Auth**: Project Token · **Actions**: 1
</Info>

## Authentication

### Project Token

Authenticate using your Mixpanel Project Token for event ingestion

<Steps>
  <Step title="Step 1">
    Sign in at [https://mixpanel.com](https://mixpanel.com)
  </Step>

  <Step title="Step 2">
    Go to Settings > Project Settings
  </Step>

  <Step title="Step 3">
    Copy your Project Token
  </Step>

  <Step title="Step 4">
    Paste the token below
  </Step>
</Steps>

#### Required Credentials

| Field              | Description                                                                                                                                                                                                                 | Required | Format                             |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------------- |
| Project Token      | Your Mixpanel Project Token from Settings > Project Settings                                                                                                                                                                | Yes      | `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` |
| Ingestion Base URL | Mixpanel ingestion base URL (optional — leave empty for [https://api.mixpanel.com](https://api.mixpanel.com) US default). Set to [https://api-eu.mixpanel.com](https://api-eu.mixpanel.com) for EU data residency projects. | No       | `https://api.mixpanel.com`         |

## Available Actions

<AccordionGroup>
  <Accordion title="emit_event_to — Send an event to Mixpanel">
    ### Parameters

    <ResponseField name="event_name" type="string" required>
      The name of the event (e.g. 'Button Click', 'Sign Up', 'Item Purchased')
    </ResponseField>

    <ResponseField name="distinct_id" type="string" required>
      The unique identifier for the user performing the event
    </ResponseField>

    <ResponseField name="properties" type="object">
      A set of properties to include with the event describing the user or event details
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "distinct_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Distinct Id"
        },
        "properties": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Properties"
        }
      },
      "required": [
        "success"
      ],
      "title": "EmitEventToOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* No documented per-token rate limits for the Track API ingestion endpoint.
* Mixpanel recommends batching events (up to 2000 per request) for high-volume use cases; this integration sends one event per call.
* Error model: non-2xx responses and Mixpanel rejections (response body `0`) are caught and returned as `success=False` + `error` rather than raising.

## Related integrations

<CardGroup cols={3}>
  <Card title="Amplitude" href="/integrations/tools/amplitude" />

  <Card title="Databricks" href="/integrations/tools/databricks" />

  <Card title="Google Tag Manager" href="/integrations/tools/google-tag-manager" />
</CardGroup>

## Links

* [Mixpanel](https://mixpanel.com)
