Sending custom events to Mixpanel using Rules

Last updated on
30 April 2025

You are browsing documentation for an older version of Drupal, which is not supported any longer, and the information may not be correct. See current documentation for Contributed modules

If you know PHP and/or Javascript and can create your own modules, that is the preferred way to send events to Mixpanel. Please see Sending custom events to Mixpanel in a custom module for more details.

However, if you can't write code, sending events to Mixpanel via Rules is best option!

Step 1: Install the required modules

You'll need to install:

If you don't know how to install modules, please see Installing contributed modules (Drupal 7).

Step 2: Create a new Rule

  1. Go to: Configuration -> Workflow -> Rules
  2. Click on: Add new rule
  3. Give it a name (for example: "Send event to Mixpanel when node is created")
  4. Select the event you want to react on (for example: Node -> "After saving new content")
  5. Click "Save"

Screenshot of the settings screen pointing out the 'Name' and 'React on event' fields.

Step 3: Add a "Track event on Mixpanel" action

  1. Click "Add action" below the "Actions" table
  2. Select "Track event on Mixpanel" from the list
  3. Give the event a name in the "Event name" field (for example: "node-created")
  4. Add some properties from the node to the properties table (for example, put the node:title in a property called "node-title")
  5. Click "Save"

Screenshot showing the event properties in the Rules UI

Now whenever a new node is created, a "node-created" event will be sent to Mixpanel!

Help improve this page

Page status: Not set

You can: