Skip to main content

Integration · Segment

Pipe Events To Segment, Get Sessions Tied To Identities

Forward Relyv events to your Segment workspace. Every user gets stitched into your CDP — analytics, CRM, and warehouse all see the same identity.

What you get

Source + destination

Relyv as a Segment source: send session events into your CDP. As a destination: receive Segment identify() and track() calls to enrich sessions.

identify() stitching

When Segment's identify() fires, anonymous Relyv sessions stitch retroactively to the resolved user. CRM, analytics, and Relyv all see the same person.

Track events forwarded

Frustration spikes, replay-worthy sessions, automated bug reports — all flow into Segment as track() calls. Wire downstream destinations as you would any other source.

Reverse lookup

Click any user in your CRM (Salesforce, HubSpot, Customer.io) and see all their Relyv sessions. Reverse-lookup is supported via Segment Personas / Twilio Engage.

Setup in four steps

  1. 1

    Add Segment write key

    Paste your Segment source write key into Relyv settings. Optional: add a destination key if you want Segment data flowing into Relyv.

  2. 2

    Define forwarded events

    Pick which Relyv events forward to Segment — session_started, frustration_spike, bug_reported, replay_shared. Custom events are supported.

  3. 3

    identify() ties to session

    When your code calls analytics.identify(userId, traits), Relyv stitches the active session to that user. Past anonymous sessions are retroactively tied.

  4. 4

    Sessions surface in your CDP

    In Segment, Personas, and downstream destinations, every user has a "last_replay_url" trait, a "frustration_score" trait, and any custom traits you forward.

Implementation details

Source vs destination — which do you want?

Source: Relyv events flow into Segment. Useful for sending replay-worthy events to your warehouse, CRM, or marketing automation. Destination: Segment events flow into Relyv. Useful for enriching sessions with the identify() and group() context your existing snippet already emits. Most teams want both; configure each independently.

Event volume and pricing

Relyv → Segment events are billed by Segment based on your plan (typically MTU or events/month). We forward only the events you opt into; nothing is sent by default. Volume is shown live in the Relyv dashboard so you can see Segment cost impact before flipping any rule live.

GDPR + retention

identity stitching honours your Segment workspace's data-residency settings. If your Segment workspace is in EU-residency mode, Relyv routes the corresponding session enrichment events through our EU region (Business / Enterprise tier). Subject-access requests delete identity-stitched data on both sides.

Frequently asked

Do I need Segment Business / Personas?

No. Source + destination work on any Segment plan, including Free. Reverse-lookup from Personas / Twilio Engage requires the Personas product — we surface the right traits regardless of where they're consumed.

How does identity stitching handle anonymous sessions?

Anonymous sessions are recorded with an anonymousId. When identify() fires (in Segment or directly via Relyv), all past anonymous sessions for that anonymousId stitch to the resolved userId. The stitch is retroactive and audit-logged.

What about events from server-side Segment libraries?

Server-side Segment libraries (Node, Python, Go, Ruby) work as destinations — they can fire identify() / track() that Relyv consumes. As sources, server-side events forwarded from Relyv go through a separate webhook destination.

Does this work with Twilio Engage?

Yes. Relyv events flow into Engage via the Segment source. Engage profiles get a "last_relyv_replay" trait and any custom traits you forward. Audience builders can query directly on those traits.

Ready to wire up Segment?

Forward Relyv events to your Segment workspace. Every user gets stitched into your CDP — analytics, CRM, and warehouse all see the same identity.