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
- In mParticle, go to Setup > Inputs.
- Open the Feeds tab and click Add Feed Input (a Custom Feed).
- Give the feed a name (e.g. “Datafly Signal”) and save it.
Copy the API key and secret
- Open the feed you just created.
- 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:
| Pod | S2S host |
|---|---|
| US1 | s2s.mparticle.com |
| US2 | s2s.us2.mparticle.com |
| EU1 | s2s.eu1.mparticle.com |
| AU1 | s2s.au1.mparticle.com |
Configuration
| Field | Required | Description |
|---|---|---|
api_key | Yes | The S2S API key for your mParticle feed (Basic-auth username). |
api_secret | Yes | The S2S API secret for your feed (Basic-auth password). |
s2s_host | Yes | Your pod’s S2S host, e.g. s2s.eu1.mparticle.com. Must match your account region. |
Configure in Signal
- Go to Integrations > Add Integration > mParticle.
- Select the Default preset.
- Enter your
api_key,api_secret, ands2s_host. - Select the consent categories that should gate delivery (typically
marketing). - Click Save.
API Endpoint
POST https://{s2s_host}/v2/events
Authorization: Basic base64(api_key:api_secret)
Content-Type: application/jsonA 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:
| Signal | mParticle field | Source | Notes |
|---|---|---|---|
| Customer ID | user_identities.customer_id | datafly.identify() user ID | Your logged-in user identifier. |
user_identities.email | email trait | Sent as-is; mParticle normalises and hashes it internally for downstream outputs. | |
| Anonymous ID | user_identities.other | Signal anonymous_id | Stable pseudonymous cross-session key. |
| IP address | ip (root) | Original request | Used by mParticle for geo and device resolution. |
| User-Agent | device_info.http_header_user_agent | Original request | Used 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 event | mParticle event_type | Detail |
|---|---|---|
page | screen_view | data.screen_name = page title |
Products Searched | custom_event | event_name: search, custom_event_type: search |
Signed Up | custom_event | event_name: sign_up |
Logged In | custom_event | event_name: login |
Product Viewed | commerce_event | product_action.action: view_detail |
Product Added | commerce_event | product_action.action: add_to_cart |
Product Removed | commerce_event | product_action.action: remove_from_cart |
Product Added to Wishlist | commerce_event | product_action.action: add_to_wishlist |
Checkout Started | commerce_event | product_action.action: checkout |
Order Completed | commerce_event | product_action.action: purchase |
Order Refunded | commerce_event | product_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
- Configure the integration with your feed credentials and the correct
s2s_host. - Trigger events on your site.
- In mParticle, open Activity > Live Stream and select your feed input. Events appear within a few seconds.
- Confirm the resolved profile under Activity > User Activity by searching for the
customer_idoremailyou sent. - A successful delivery is 202 Accepted in Signal’s event debugger.
Troubleshooting
| Problem | Solution |
|---|---|
401 Unauthorized | Wrong 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 Forbidden | The feed is disabled, or the key lacks Server-to-Server permission. Re-enable the feed. |
| Events not in Live Stream | Check s2s_host matches your account region (US1/US2/EU1/AU1). A wrong host silently fails. |
400 Bad Request | Malformed 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 plan | If 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 merging | Ensure you call datafly.identify() so customer_id and email are present — IDSync needs at least one strong identifier to resolve a profile. |