Segment (as destination)
If you already have a CDP, Signal can be its first-party collector. This integration forwards events from Signal into your existing Segment workspace as an HTTP Source so Segment’s destination fan-out continues unchanged, while Signal replaces the browser SDK with a first-party server-side collector on your own domain.
Signal is not a replacement for Segment. Segment remains your downstream activation and routing layer; Signal sits in front of it as the upstream first-party collector. Use this integration if you already run Segment and want first-party collection without disturbing existing destinations.
Prerequisites
- A Segment workspace.
- An HTTP API Source configured in that workspace.
- The source write key.
- Knowledge of whether your workspace is in the US or EU region (this determines the endpoint).
Get your credentials
Create or locate an HTTP API source
In the Segment dashboard, open Connections > Sources and either select an existing HTTP API source or click Add Source > HTTP API to create one.
Copy your write key
Open the source and copy the Write Key from Settings > API Keys. This is a secret — treat it like a password.
Confirm your region
Workspaces created in the EU stack use https://events.eu1.segmentapis.com/v1 instead of the default https://api.segment.io/v1. The Workspace Settings page in Segment shows the region.
Configure in Signal
Configuration fields
| Field | Required | Description |
|---|---|---|
write_key | Yes | Segment HTTP API source write key. Stored as a secret. |
endpoint | No | Default https://api.segment.io/v1. Override to https://events.eu1.segmentapis.com/v1 for EU workspaces. |
Management UI setup
- Go to Integrations > Add Integration > Segment (as destination).
- Enter your
write_key. - If your workspace is in the EU, override the
endpointto the EU URL. - Select the General preset.
- Choose consent categories (default:
analytics). - Save and enable.
Management API setup
curl -X POST https://api.example.com/v1/admin/integrations \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source_id": "src_abc123",
"vendor": "segment_destination",
"name": "Segment Production",
"enabled": true,
"config": {
"write_key": "your_write_key",
"endpoint": "https://api.segment.io/v1"
},
"consent_categories": ["analytics"]
}'API endpoint
POST {endpoint}/track
Authorization: Basic {base64(write_key:)}Other Segment event types share the same base path on their canonical sub-paths (/identify, /page, /group, /batch). The default Signal preset targets /track; pipelines can override per event type if needed.
Event mapping
Signal’s canonical event model was designed to be Segment-compatible, so this is a near-pure pass-through.
| Signal event | Segment event | Endpoint path |
|---|---|---|
page | page | /page |
identify | identify | /identify |
group | group | /group |
Order Completed (or any track event) | Order Completed (name preserved) | /track |
Properties pass through to Segment’s properties object. Traits set via datafly.identify() pass through to traits.
Example: Order Completed
Signal call:
datafly.track("Order Completed", {
order_id: "ORD-001",
total: 129.99,
currency: "USD",
products: [
{ product_id: "SKU-A", name: "Widget", price: 49.99, quantity: 2 }
]
});Payload sent to Segment:
{
"type": "track",
"event": "Order Completed",
"anonymousId": "anon_a1b2c3",
"userId": "user_42",
"messageId": "evt_abc123",
"timestamp": "2026-05-12T10:00:00.000Z",
"context": {
"ip": "203.0.113.50",
"userAgent": "Mozilla/5.0 ...",
"page": { "url": "https://example.com/checkout/confirmation" },
"library": { "name": "datafly.js", "version": "1.0.0" }
},
"properties": {
"order_id": "ORD-001",
"total": 129.99,
"currency": "USD",
"products": [
{ "product_id": "SKU-A", "name": "Widget", "price": 49.99, "quantity": 2 }
]
}
}Identity
| Signal field | Segment field |
|---|---|
anonymous_id | anonymousId |
user_id | userId |
event_id | messageId |
context.ip | context.ip |
context.user_agent | context.userAgent |
context.page | context.page |
context.campaign | context.campaign |
context.library | context.library |
Signal generates a stable first-party anonymous_id and forwards it to Segment as anonymousId. When datafly.identify() is called, the same userId arrives at Segment on subsequent events.
Consent
The default consent category for this integration is analytics. Events are only forwarded when the visitor has granted analytics consent.
Override the category list in the integration config if you need to gate delivery on a different category.
Verify
Trigger an event
Call:
datafly.track("Test Event", { source: "signal-verify" });Check the Source Debugger
In Segment, open Connections > Sources > your HTTP source > Debugger. The event should appear within seconds. Confirm:
eventname matches what Signal sentanonymousIdis populatedpropertiescontains the expected payload
Confirm downstream delivery
Open one of your downstream Segment destinations and confirm the event reached it — this validates that Signal-collected events fan out exactly as Segment’s own SDK-collected events do.
Troubleshooting
| Problem | Solution |
|---|---|
| 401 from Segment | Write key is wrong, revoked, or attached to a different source. Regenerate and update the integration config. |
| 404 from Segment | The endpoint is wrong — most commonly an EU workspace pointed at the US endpoint. Switch to https://events.eu1.segmentapis.com/v1. |
| Events accepted but not visible in Debugger | The HTTP source is disabled, or you’re looking at a different source’s debugger. Confirm the write key matches the source you’re viewing. |
| Events appear in Segment but not in a destination | Issue is downstream of Signal — check the destination configuration in the Segment dashboard. |
userId is missing | datafly.identify() has not yet been called for the visitor. Verify identify is wired into your login / form-submit flow. |
See also
- RudderStack — same pattern for RudderStack.
- Tealium EventStream — same pattern for Tealium.
- Migration Playbook — phased plan to put Signal in front of an existing CDP.