Skip to main content

About Mixpanel

Mixpanel is a powerful product analytics platform that helps teams understand how users interact with their products through event-based tracking and behavioral analysis. Key features include:
  • Event Tracking: Track user actions and interactions in real time, from page views and clicks to custom business events, enabling granular understanding of user behavior.
  • Segmentation: Slice and dice event data by any property — user attributes, event properties, or time ranges — to uncover patterns and trends across different user segments.
  • Funnels: Define multi-step conversion funnels to measure drop-off rates, identify bottlenecks, and optimize user journeys from sign-up to activation and beyond.
  • Retention Analysis: Measure how often users return to your product over time, track engagement curves, and identify what drives long-term user retention.
  • User Profiles: Maintain rich user profiles with demographic, behavioral, and custom properties, enabling targeted analysis and personalized experiences.
  • Cohort Analysis: Group users based on shared behaviors or attributes and compare how different cohorts engage with your product over time.

Authentication Options

Below are possible authentication options you can choose:

Generate Mixpanel API Credentials

  1. Log in to your Mixpanel dashboard.
  2. Navigate to SettingsProject Settings.
  3. Under Access Keys, locate your API Secret — copy and store it securely.
  4. Note your Project ID from the project settings page (you may need this for certain queries).

Integrate Mixpanel into xpander.ai

  1. In your xpander.ai dashboard, go to the Connectors section in the sidebar.
  2. Select Mixpanel from the list of available integrations.
  3. Click Enable.
  4. Enter a connector name, e.g., “xpander-mixpanel”.
  5. Choose Integration User as the authentication mode.
  6. Select API Key as the authentication method.
  7. Set the Auth Type to Custom.
  8. In the Custom header name field, type: Authorization
  9. In the Value field, enter Basic followed by the Base64-encoded value of your API Secret with a trailing colon. For example, if your API Secret is abc123, encode abc123: in Base64 and enter: Basic YWJjMTIzOg==
  10. In the Interface specific settings section, set the server URL to: https://mixpanel.com/api/query
    • For EU Data Residency: https://eu.mixpanel.com/api/query
    • For India Data Residency: https://in.mixpanel.com/api/query
  11. Save the configuration.
To encode your API Secret for Basic auth, run the following command in your terminal:
echo -n "YOUR_API_SECRET:" | base64
Then prepend Basic to the output value.

Integration of Mixpanel into AI Agent

Once you’ve configured your Mixpanel account with the authentication option(s) described above, you can integrate it into your AI agent with xpander.ai:
  1. In your xpander.ai dashboard, go to the Agent Configuration tab and select Tools, then click Add Tools.
  2. Select Connectors.
  3. Choose Mixpanel with the same connector name you configured in the previous section (e.g., xpander-mixpanel).
  4. Select the available Mixpanel operations that suit your use case.

Available Operations

The Mixpanel connector provides the following operations: Event Analytics
OperationDescription
Get Events DataRetrieve event counts over a date range with daily/hourly/weekly granularity
Get Common Event NamesList all tracked event names in the project
Get Top Events TodayShow the most popular events with percentage change vs. previous period
Segmentation
OperationDescription
Get Segmented Event DataSegment events by any property with date range filtering
Get Average of Event ExpressionCalculate the average of a numeric event property over time
Get Numeric Segmented DataGet numeric breakdowns of event data
Get Sum of Event ExpressionCalculate the sum of a numeric event property over time
Event Properties
OperationDescription
Get Top Event Property NamesList the most common properties for a given event
Get Top Property ValuesShow the most frequent values for a specific event property
Get Event Property DataRetrieve detailed property data for events
Funnels
OperationDescription
Get Funnel DataRetrieve conversion data for a specific funnel
Get Funnel Names and IDsList all configured funnels in the project
User Analytics
OperationDescription
Engage QueryQuery user profiles with filters and pagination
Get Activity FeedRetrieve the activity stream for specific users
List CohortsList all defined user cohorts
Retention
OperationDescription
Get Retention DataMeasure user retention over configurable time windows
Get Addiction Retention DataAnalyze frequency-based retention patterns
Advanced
OperationDescription
Query JQLRun custom JQL (JavaScript Query Language) expressions for complex analysis
Get Report DataRetrieve data from saved Insights reports by bookmark ID

AI Agent Mixpanel Prompt Library

Below are possible prompts or use cases you can try after integrating Mixpanel into your xpander AI agent:
What events are being tracked in our Mixpanel project?
Show me Login event trends from {start_date} to {end_date}.
Show me Page View events segmented by the page property over the last 2 weeks.
What are the top events today and how do they compare to yesterday?
Show me the activity feed for user {distinct_id} from the last 7 days.
Show me our user profiles — who are our enterprise plan users?
What are the most common values for the connector_type property of Add Connector events?
What is the average number of API Call events per day this month?