Segment
Server-side event delivery to Segment via the official @segment/analytics-node SDK. Implements the full Segment Spec surface -- track, identify, group, page, and screen -- with automatic identity deduplication and graceful shutdown via closeAndFlush().
Segment is a server destination in the walkerOS flow:
Receives events server-side from the collector, resolves identity and consent context, and forwards them to Segment for routing to 400+ downstream destinations.
Installation
Setup
- Integrated
- Bundled
Configuration reference
| Property | Type | Description | More |
|---|---|---|---|
writeKey | string | Segment source write key. Find it in your Segment workspace under Connections > Sources > Settings > API Keys. | |
userId | string | walkerOS mapping value path to resolve userId from each event (like user.id). | |
anonymousId | string | walkerOS mapping value path to resolve anonymousId from each event (like user.session). | |
host | string | Base URL of Segment API. Set to https://events.eu1.segmentapis.com for EU endpoint. | |
path | string | API path route (like /v1/batch). | |
flushAt | integer | Events to enqueue before flushing a batch. Default: 15. | |
flushInterval | integer | Max milliseconds before auto-flush. Default: 10000. | |
maxRetries | integer | Retry attempts for failed batches. Default: 3. | |
httpRequestTimeout | integer | HTTP request timeout in milliseconds. Default: 10000. | |
disable | boolean | Completely disable the SDK (no-ops all calls). Default: false. | |
identify | any | Destination-level identity mapping. Resolves to { traits } object. Fires identify() on the first push and re-fires when values change. | |
group | any | Destination-level group mapping. Resolves to { groupId, traits }. Fires group() on the first push and re-fires on change. | |
consent | Record<string, string> | Mapping from walkerOS consent keys to Segment categoryPreferences keys. Example: { "marketing": "Advertising", "analytics": "Analytics" }. | |
integrations | Record<string, any> | Enable/disable downstream Segment destinations. Example: { "All": true, "Mixpanel": false }. |
Identity is resolved automatically from each event: userId defaults to user.id and anonymousId defaults to user.session. At least one must be present for a call to be sent. Override these paths in settings to match your event structure.
Docker deployment
Step 1: Create flow configuration
Use the $env.NAME syntax in your flow configuration to reference environment variables at runtime:
Step 2: Bundle the flow
Bundle your flow configuration before running in Docker:
Step 3: Run with Docker
Docker Compose example
Never commit write keys to version control. Use environment variables or a secrets manager to inject credentials at runtime. For EU data residency, set host to https://events.eu1.segmentapis.com.