mParticle

Datafly Signal delivers events server-to-server into the mParticle Customer Data Platform using the Events API (POST /v2/events). Signal sends behavioural events together with the user’s identities, so mParticle’s IDSync can resolve a stable profile, enrich it, and forward it to every downstream output you have connected (ad platforms, analytics, warehouses, marketing tools).

Prerequisites

Before configuring mParticle in Signal you need an mParticle account and a Server-to-Server (S2S) input feed with API credentials.

Create a Custom Feed input

  1. In mParticle, go to Setup > Inputs.
  2. Open the Feeds tab and click Add Feed Input (a Custom Feed).
  3. Give the feed a name (e.g. “Datafly Signal”) and save it.

Copy the API key and secret

  1. Open the feed you just created.
  2. In the Connection details panel, copy the Key and Secret. These are the Server-to-Server credentials used for Basic authentication.
⚠️

The secret is shown once. Store it securely — if you lose it you will need to rotate the credential.

Identify your data region (pod)

mParticle provisions your account in a specific region. Note which pod you are on — it determines the API host:

PodS2S host
US1s2s.mparticle.com
US2s2s.us2.mparticle.com
EU1s2s.eu1.mparticle.com
AU1s2s.au1.mparticle.com

Configuration

FieldRequiredDescription
api_keyYesThe S2S API key for your mParticle feed (Basic-auth username).
api_secretYesThe S2S API secret for your feed (Basic-auth password).
s2s_hostYesYour pod’s S2S host, e.g. s2s.eu1.mparticle.com. Must match your account region.

Configure in Signal

  1. Go to Integrations > Add Integration > mParticle.
  2. Select the Default preset.
  3. Enter your api_key, api_secret, and s2s_host.
  4. Select the consent categories that should gate delivery (typically marketing).
  5. Click Save.

API Endpoint

POST https://{s2s_host}/v2/events
Authorization: Basic base64(api_key:api_secret)
Content-Type: application/json

A successful request returns 202 Accepted. Each request carries a single user’s identities at the root and that user’s events in the events array.

Identity Signals

mParticle resolves a profile from the user_identities object using IDSync. Signal populates these automatically:

SignalmParticle fieldSourceNotes
Customer IDuser_identities.customer_iddatafly.identify() user IDYour logged-in user identifier.
Emailuser_identities.emailemail traitSent as-is; mParticle normalises and hashes it internally for downstream outputs.
Anonymous IDuser_identities.otherSignal anonymous_idStable pseudonymous cross-session key.
IP addressip (root)Original requestUsed by mParticle for geo and device resolution.
User-Agentdevice_info.http_header_user_agentOriginal requestUsed for device resolution.

Unlike ad-network conversion APIs, mParticle expects raw email in user_identities and performs its own normalisation and hashing. If your policy requires PII never to leave your perimeter unhashed even to a CDP, move email to a hashed user_attribute instead — edit the Field Mappings in the Management UI.

First and last name and phone are sent as mParticle reserved user attributes ($firstname, $lastname, $mobile). Marketing consent maps to consent_state.gdpr.marketing.consented.

Event Mapping

Signal maps GA4-style event names to mParticle’s three event envelope types — screen_view, custom_event, and commerce_event:

Signal eventmParticle event_typeDetail
pagescreen_viewdata.screen_name = page title
Products Searchedcustom_eventevent_name: search, custom_event_type: search
Signed Upcustom_eventevent_name: sign_up
Logged Incustom_eventevent_name: login
Product Viewedcommerce_eventproduct_action.action: view_detail
Product Addedcommerce_eventproduct_action.action: add_to_cart
Product Removedcommerce_eventproduct_action.action: remove_from_cart
Product Added to Wishlistcommerce_eventproduct_action.action: add_to_wishlist
Checkout Startedcommerce_eventproduct_action.action: checkout
Order Completedcommerce_eventproduct_action.action: purchase
Order Refundedcommerce_eventproduct_action.action: refund

Events not in the mapping are dropped (defaults.action: drop). To add or change a mapping, edit the integration’s Field Mappings in the Management UI.

Example: Order Completed

Datafly.js call:

datafly.identify("user-123", { email: "jane.doe@example.com" });
 
datafly.track("Order Completed", {
  order_id: "ORD-001",
  revenue: 129.99,
  currency: "USD",
  tax: 8.00,
  shipping: 4.99,
  products: [
    { product_id: "SKU-A", name: "Widget", price: 49.99, quantity: 2 },
    { product_id: "SKU-B", name: "Gadget", price: 30.01, quantity: 1 }
  ]
});

mParticle payload sent by Signal:

{
  "environment": "production",
  "schema_version": 2,
  "ip": "203.0.113.50",
  "user_identities": {
    "customer_id": "user-123",
    "email": "jane.doe@example.com",
    "other": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  "device_info": {
    "http_header_user_agent": "Mozilla/5.0 ..."
  },
  "events": [
    {
      "event_type": "commerce_event",
      "data": {
        "currency_code": "USD",
        "timestamp_unixtime_ms": 1706540000000,
        "source_message_id": "evt_abc123def456",
        "product_action": {
          "action": "purchase",
          "transaction_id": "ORD-001",
          "total_amount": 129.99,
          "tax_amount": 8.00,
          "shipping_amount": 4.99,
          "products": [
            { "id": "SKU-A", "name": "Widget", "price": 49.99, "quantity": 2 },
            { "id": "SKU-B", "name": "Gadget", "price": 30.01, "quantity": 1 }
          ]
        }
      }
    }
  ]
}

Testing

  1. Configure the integration with your feed credentials and the correct s2s_host.
  2. Trigger events on your site.
  3. In mParticle, open Activity > Live Stream and select your feed input. Events appear within a few seconds.
  4. Confirm the resolved profile under Activity > User Activity by searching for the customer_id or email you sent.
  5. A successful delivery is 202 Accepted in Signal’s event debugger.

Troubleshooting

ProblemSolution
401 UnauthorizedWrong API key/secret, or you used platform-level credentials instead of the feed’s S2S key/secret. Re-copy from the feed’s Connection details.
403 ForbiddenThe feed is disabled, or the key lacks Server-to-Server permission. Re-enable the feed.
Events not in Live StreamCheck s2s_host matches your account region (US1/US2/EU1/AU1). A wrong host silently fails.
400 Bad RequestMalformed batch, a single batch exceeding the size limit, or an invalid schema_version. Inspect the payload in Signal’s event debugger.
Events rejected by a data planIf your mParticle workspace enforces a data plan, the event_name / custom_event_type values must be allowed by the plan. Align the blueprint mappings with your plan or relax plan enforcement.
Profiles not mergingEnsure you call datafly.identify() so customer_id and email are present — IDSync needs at least one strong identifier to resolve a profile.