View as Markdown
Mixpanel icon

Mixpanel ACTION

mixpanel.track

Send an event to mixpanel
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Mixpanel account once, then configure and run mixpanel.track from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "mixpanel-emit-event-to",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    mixpanel: { authProvisionId: "apn_xxxxxxx" },
    event_name: "Event name",
    distinct_id: "Distinct id",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

mixpanel.track inputs
Property Type Description
event_name Event name string
The name of the event. This can be anything the user does - 'Button Click', 'Sign Up', 'Item Purchased', etc.
Required
distinct_id Distinct id string
Required
properties Properties object
A set of properties to include with the event you're sending. These describe the user who did the event or details about the event itself.
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
mixpanel-emit-event-to
Version
0.3.2
App
Mixpanel
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes