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).

Why route mParticle through Datafly Signal

  • Profiles are updated from the server, not the browser. Events reach mParticle even when a tracker blocker or a failed page unload would have dropped a client-side call, so the profile reflects what actually happened.
  • Client IP and user agent are carried in the payload. Both are taken from the original visitor request rather than your server, which is what mParticle needs to attribute the event to the right session.
  • Delivery is batched, rate-limited, and retried. Signal buffers to Kafka, respects the mParticle rate limit, and retries on 429 or transient failure rather than dropping the event.
  • One consent decision governs every destination. mParticle is gated by the same consent state as the rest of your stack, so a withdrawal applies everywhere at once.

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 traitTrimmed and lowercased, otherwise raw; mParticle 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.
Request IDsource_request_idSignal event IDmParticle deduplicates inbound batches on it.

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, the phone shaped to E.164). mParticle is your own customer data platform and its outputs message the customer, so these are plain text (see Personal data by integration). Marketing consent maps to consent_state.gdpr.marketing.consented (a boolean, with timestamp_unixtime_ms); define a GDPR purpose named marketing in mParticle for it to apply.

Event Mapping

The Default preset maps Signal’s canonical events to mParticle’s event envelope types: screen_view, custom_event and commerce_event.

Signal eventmParticle event_typeDetail
page, screen_viewscreen_viewdata.screen_name = page name or title / the mobile screen name
search, view_search_resultscustom_eventcustom_event_type: search
view_item_listcustom_eventcustom_event_type: navigation
sign_up, logincustom_eventcustom_event_type: user_content
generate_leadcustom_eventcustom_event_type: transaction
view_item / select_itemcommerce_eventproduct_action.action: view_detail / click
add_to_cart / remove_from_cartcommerce_eventadd_to_cart / remove_from_cart
add_to_wishlist / remove_from_wishlistcommerce_eventadd_to_wishlist / remove_from_wish_list
begin_checkoutcommerce_eventcheckout
add_shipping_info / add_payment_infocommerce_eventcheckout_option, checkout_options = shipping tier / payment type
purchase / refundcommerce_eventpurchase / refund, transaction_id required
view_promotion / select_promotioncommerce_eventpromotion_action.action: view / click

Products are built from items[]: item_id to id, item_name to name, item_brand, item_category, item_variant to brand, category, variant, index to position, coupon to coupon_code, price and quantity unchanged. value (or the legacy revenue) is total_amount.

The Insurance preset maps the insurance event spec: quotes, leads, contact requests, documents and claims as custom_event with their properties as custom_attributes; policy view, basket, application and payment as commerce_event; purchase, policy_purchased and policy_renewed as purchase product actions with the policy number as transaction_id; policy_cancelled as a 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: purchase

Datafly.js call:

datafly.identify("user-123", { email: "jane.doe@example.com" });
 
datafly.track("purchase", {
  transaction_id: "ORD-001",
  value: 129.99,
  currency: "USD",
  tax: 8.00,
  shipping: 4.99,
  items: [
    { item_id: "SKU-A", item_name: "Widget", price: 49.99, quantity: 2 },
    { item_id: "SKU-B", item_name: "Gadget", price: 30.01, quantity: 1 }
  ]
});

mParticle payload sent by Signal:

{
  "environment": "production",
  "schema_version": 2,
  "ip": "203.0.113.50",
  "source_request_id": "evt_abc123def456",
  "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.