Prepare the Segment source
Create an HTTP API source in your Segment workspace. Store its write key in your server secret manager. Use the US or EU endpoint that corresponds to your Segment workspace.
Deploy the receiver
Download source.mjs and run it with Node.js 22 or later behind a public HTTPS reverse proxy. Route /oraami/segment to the listener, which defaults to 127.0.0.1:8787. The proxy must preserve the original body and Oraami headers.
In Oraami Webhooks, add that public URL, select the topics, and save the new signing key. Supply ORAAMI_SIGNING_SECRET and SEGMENT_WRITE_KEY through the receiver’s environment. Set SEGMENT_REGION to us or eu. You can set BIND_HOST and PORT to match your deployment.
node source.mjsCheck both sides of the delivery
Send a test in Oraami. Look for an accepted delivery and Oraami Webhook Test in the Segment source debugger. A saved browser event appears as Oraami Event Recorded, and a measured assessment as Oraami Assessment Completed.
The receiver uses the Oraami delivery ID for Segment messageId and the pseudonymous visitor ID for anonymousId. For tests it uses a site-scoped synthetic identifier. It forwards selected identifiers, event type, score and counts. If Segment rejects the event, the receiver returns an error so the Oraami queue can retry.