← Mixpanel

mixpanel.track with Mixpanel API

Pipedream makes it easy to connect APIs for Mixpanel and 900+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
mixpanel.track with the Mixpanel API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Create a workflow to mixpanel.track with the Mixpanel API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the mixpanel.track action
    1. Connect your Mixpanel account
    2. Configure event_name
    3. Configure distinct_id
    4. Configure properties
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

mixpanel.track with Mixpanel API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Mixpanel
 
Try it
mixpanel.track with Mixpanel API on New Item in Feed from RSS API
RSS + Mixpanel
 
Try it
mixpanel.track with Mixpanel API on New Message from Discord API
Discord + Mixpanel
 
Try it
mixpanel.track with Mixpanel API on New Message In Channels from Slack API
Slack + Mixpanel
 
Try it
mixpanel.track with Mixpanel API on New Message in Channel from Discord Bot API
Discord Bot + Mixpanel
 
Try it

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

mixpanel.track on Mixpanel
Description:Send an event to mixpanel
Version:0.3.1
Key:mixpanel-emit-event-to

Code

// legacy_hash_id: a_Nqir27
import Mixpanel from "mixpanel";

export default {
  key: "mixpanel-emit-event-to",
  name: "mixpanel.track",
  description: "Send an event to mixpanel",
  version: "0.3.1",
  type: "action",
  props: {
    mixpanel: {
      type: "app",
      app: "mixpanel",
    },
    event_name: {
      type: "string",
      description: "The name of the event. This can be anything the user does - 'Button Click', 'Sign Up', 'Item Purchased', etc.",
    },
    distinct_id: {
      type: "string",
    },
    properties: {
      type: "object",
      description: "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.",
    },
  },
  async run() {
    const mixpanel = await Mixpanel.init(this.mixpanel.$auth.token, {
      protocol: "https",
    });

    // We purposely separated distinct_id to make it explicit; however, we include it in the return value
    await new Promise((resolve) => mixpanel.track(
      this.event_name,
      Object.assign({
        "distinct_id": this.distinct_id,
      }, this.properties),
      resolve,
    ));

    return Object.assign({
      "distinct_id": this.distinct_id,
    }, this.properties);
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
MixpanelmixpanelappThis component uses the Mixpanel app.
event_namestring

The name of the event. This can be anything the user does - 'Button Click', 'Sign Up', 'Item Purchased', etc.

distinct_idstring
propertiesobject

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.

Authentication

Mixpanel uses API keys for authentication. When you connect your Mixpanel account, Pipedream securely stores the keys so you can easily authenticate to Mixpanel APIs in both code and no-code steps.

Enter your project token below.

About Mixpanel

Powerful, self-serve product analytics to help you convert, engage, and retain more users