How it works

This integration sends audience engagement data—also available as reporting webhooks—to Mixpanel, where you can use it alongside your other user and analytics data to gain insight into your audience’s behaviors.

The events we send are both based on things that happen in Customer.io and your customer activity. For example, an email sent event indicates that we’ve sent an email to a person, but an email clicked event lets you know that your audience clicked a link in your email.

sequenceDiagram actor a as Your Audience participant b as Customer.io participant c as Mixpanel b->>a: send email b-->>c: report email send a->>b: user clicks link b-->>c: report email clicked

Enable the Mixpanel integration

As a part of this process, you’ll need your Mixpanel project token.

  1. Go to Data & Integrations > Integrations and select the Mixpanel integration card.

    find and enable the Mixpanel integration
    find and enable the Mixpanel integration

  2. Copy and paste your Mixpanel project token into the Project Token field. You’ll find your key in Mixpanel Settings > Project Settings.

  3. (Optional) If your account is in Mixpanel’s EU data centre, enable the Use EU Data Residency setting.

  4. Select the events that you want to send to Mixpanel. We describe each event on the page. Check out our reporting documentation for more information about the data available to each event.

  5. (Optional) Enable Body Content to capture the first 255 characters of messages in Sent events. This is a Mixpanel limitation. You can still lookup deliveries in Customer.io to see the full contents of sent messages.

  6. Click Save.

    select your events and click save
    select your events and click save

Test your integration

When you add your project token and set up your integration, you can click Test Connection to make sure that your key is valid and connects to the correct project in Mixpanel.

The test sends an email sent event to Mixpanel to ensure that your API key is valid. You can check your Mixpanel project for this email sent event to make sure that you set up your integration for the Mixpanel project you want to send Customer.io data to.

Payload reference

In this integration, we map our reporting webhook payloads to fit Mixpanel’s track format. Below is a list of fields from our reporting webhooks and how we map them to Mixpanel. We’ve also provided examples of both kinds of events.

 Check Message to find the campaign_id in Mixpanel

In Mixpanel, campaign_id is a reserved property. If you look at an event for a message sent as a part of campaign in Mixpanel, the Message field under All Properties represents the campaign_id. If you switch to JSON mode, you’ll also see the campaign_id.

Mixpanel FieldCustomer.io FieldDescription
eventobject_type + metricRepresents the channel and metric. We capitalize/camel-case these items, e.g. Email Sent
properties.distinct_ididentifiers.idIf a person doesn’t have an id, this property is blank.
properties.profile_emailidentifiers.emailIf a person doesn’t have an email, this property is blank
properties.devices"id": recipient.device_id
"platform": recipient.device_platform
An array of objects, where each object represents a device.
properties.$insert_idevent_idThe unique identifier for the event, used to deduplicate events in Mixpanel.
properties.timetimestampThe date-time when the event occurred, not necessarily when the event is sent to Mixpanel.
properties.account_id[account_id]While your account_id isn’t in our standard reporting webhook payload, we send this to Mixpanel to support their Group Analytics add on.
properties.workspace_id[workspace_id]While your workspace_id isn’t in our standard reporting webhook payload, we send this to Mixpanel to support their Group Analytics add on.
propertiesThe remaining fields in the webhook payload
  "event": "Sms Sent",
  "properties": {
    "time": 1668976965,
    "distinct_id": "346300",
    "$insert_id": "01GJBCEYDJMH4VCDKXC98JNQ2D",
    "account_id": [1],
    "action_id": 1000495,
    "campaign_id": 1000024,
    "content": "Hey jenny! I got your number!",
    "customer_id": "346300",
    "delivery_id": "dgSiuAMAAK2_Fqu_FgGElsdx39aGHalAkXrIOwc=",
    "headers": {},
    "journey_id": "01GJ3N8GM0AK1FJB1WFNCN2N7C",
    "recipient": "+15558675309",
    "workspace_id": [56354]
  "event_id": "01GJBCEYDJMH4VCDKXC98JNQ2D",
  "object_type": "sms",
  "timestamp": 1668976965,
  "metric": "sent",
  "data": {
    "trigger_id": 1,
    "customer_id": "346300",
    "delivery_id": "dgSiuAMAAK2_Fqu_FgGElsdx39aGHalAkXrIOwc=",
    "action_id": 1000495,
    "campaign_id": 1000024,
    "journey_id": "01GJ3N8GM0AK1FJB1WFNCN2N7C",
    "identifiers": {
      "id": "346300",
      "email": "cool.person@example.com",
      "cio_id": "d9c106000001"
    "content": "Hey Jenny! I got your number!",
    "recipient": "+15558675309"
Copied to clipboard!
Is this page helpful?