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

# Mixpanel

> Built successful products by analyzing, testing, and observing product usage with Mixpanel, **now at the edge**.

<img src="https://mintcdn.com/edgee/enlt_qUyIUJ64Dg-/images/banners/mix.png?fit=max&auto=format&n=enlt_qUyIUJ64Dg-&q=85&s=7a6360ebb6f8bf0a0c8d5e08c4d02e63" className="rounded-lg" noZoom width="1312" height="334" data-path="images/banners/mix.png" />

Find it on GitHub: [<Icon icon="github" iconType="solid" /> /edgee-ai/mixpanel-component](https://github.com/edgee-ai/mixpanel-component)

Mixpanel is a powerful product analytics platform that helps you analyze user behavior, understand engagement, and make data-driven decisions. With Mixpanel, you can track events, create funnels, measure retention, and gain actionable insights about how users interact with your product.

This component lets you collect and forward analytics events to your Mixpanel instance directly from the edge, enabling real-time tracking and analysis while maintaining optimal performance.

## Event Mapping

Here's how Edgee events map to PostHog events:

| Edgee Event | PostHog Event   | Description                         |
| ----------- | --------------- | ----------------------------------- |
| Page        | `page`          | pageview event with url as property |
| Track       | Your event name | A event with your custom event name |
| User        | `user`          | Sets all the data for the user      |

## Getting Started

**To integrate PostHog into your Edgee project:**

1. Open the Edgee console and navigate to your project's Components.
2. Select "Add a component" and choose `edgee/mixpanel` from the list of available components.
3. Enter your Mixpanel API Secret, Project Token, and optionally Project ID and Region.
4. Click Save.
5. Once the component has been configured, you are ready to send analysis events to Mixpanel.

## Component Name

When configuring the component in your **Edgee Data Layer** or within SDK calls, use `edgee/mixpanel` as the component name:

```json theme={"dark"}
{
  "components": {
    "edgee/mixpanel": true
  }
}
```
