IntegrationsCDPSegment (as destination)

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.

Why route Segment (as destination) through Datafly Signal

  • Profiles are updated from the server, not the browser. Events reach Segment (as destination) 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 Segment (as destination) needs to attribute the event to the right session.
  • One consent decision governs every destination. Segment (as destination) is gated by the same consent state as the rest of your stack, so a withdrawal applies everywhere at once.

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

FieldRequiredDescription
write_keyYesSegment HTTP API source write key. Stored as a secret.
endpointNoDefault https://api.segment.io/v1. Override to https://events.eu1.segmentapis.com/v1 for EU workspaces.

Management UI setup

  1. Go to Integrations > Add Integration > Segment (as destination).
  2. Enter your write_key.
  3. If your workspace is in the EU, override the endpoint to the EU URL.
  4. Select the General preset.
  5. Choose consent categories (default: analytics).
  6. 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

Each call type goes to its own path of the HTTP Tracking API, authenticated with HTTP Basic (write_key:):

POST {endpoint}/track      track events
POST {endpoint}/page       page views
POST {endpoint}/screen     mobile screen views (screen_view)
POST {endpoint}/identify   identify() calls
POST {endpoint}/group      group() calls

Every call carries userId or anonymousId, messageId (the Signal event ID, which Segment uses for deduplication) and timestamp; page and screen carry name, group carries groupId. Calls are limited to 32 KB each.

Presets

PresetKeyWhat it sends
GeneralgeneralEvery Signal call forwarded 1:1 to the Segment call of the same type, event names and properties unchanged.
RetailecommerceAs General, with Signal’s ecommerce events renamed to the Segment Ecommerce Spec V2 that Segment follows, so downstream destinations recognise them.

Retail: event names

Signal eventSegment eventNotes
searchProducts Searchedquery from search_term
view_item_listProduct List Viewedlist_id, category, products[]
select_itemProduct Clickedfirst item’s fields flat on properties
view_itemProduct Viewedfirst item’s fields flat, plus value, currency
add_to_cart / remove_from_cartProduct Added / Product Removedfirst item’s fields flat
view_cartCart Viewedproducts[]
begin_checkoutCheckout Startedvalue, currency, coupon, products[]
add_shipping_info / add_payment_infoCheckout Step Completed / Payment Info Enteredshipping_method / payment_method
purchaseOrder Completedorder_id, revenue, tax, shipping, coupon, affiliation, currency, products[]
refundOrder Refundedorder_id, total, currency, products[]
view_promotion / select_promotionPromotion Viewed / Promotion Clickedpromotion_id, name, creative, position
add_to_wishlist / remove_from_wishlistProduct Added to Wishlist / Product Removed from Wishlistfirst item’s fields flat
coupon_applied / coupon_deniedCoupon Applied / Coupon Deniedcoupon_id
product_shared / product_reviewedProduct Shared / Product Reviewed

Products map item_id to product_id and sku, item_name to name, item_category to category, item_brand to brand, item_variant to variant, index to position, with price, quantity and coupon unchanged.

Example: purchase with the Retail preset

Signal call:

datafly.track("purchase", {
  transaction_id: "ORD-001",
  value: 129.99,
  currency: "USD",
  items: [
    { item_id: "SKU-A", item_name: "Widget", price: 49.99, quantity: 2 }
  ]
});

Payload sent to {endpoint}/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" }
  },
  "properties": {
    "order_id": "ORD-001",
    "revenue": 129.99,
    "currency": "USD",
    "products": [
      { "product_id": "SKU-A", "sku": "SKU-A", "name": "Widget", "price": 49.99, "quantity": 2 }
    ]
  }
}

Identity

Signal fieldSegment field
anonymous_idanonymousId
user_iduserId
event_idmessageId
context.ipcontext.ip
context.user_agentcontext.userAgent
context.pagecontext.page
context.campaigncontext.campaign
context.librarycontext.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.

identify() traits are sent as traits on the /identify call as the visitor supplied them, including email: Segment forwards identity to its own destinations and hashes per destination where a destination needs it. It is the only call that carries personal data; track and page calls carry no traits.

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:

  • event name matches what Signal sent
  • anonymousId is populated
  • properties contains 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

ProblemSolution
401 from SegmentWrite key is wrong, revoked, or attached to a different source. Regenerate and update the integration config.
404 from SegmentThe 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 DebuggerThe 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 destinationIssue is downstream of Signal — check the destination configuration in the Segment dashboard.
userId is missingdatafly.identify() has not yet been called for the visitor. Verify identify is wired into your login / form-submit flow.

See also