Skip to Content
💡

This feature is only available on Business plans and above .

Revroute’s Segment integration  provides a bi-directional sync between your Segment workspace and Revroute. There are 2 parts to the integration:

In this guide, we will be focusing on using the Revroute (Actions) Destination  to track conversion events directly from Segment.

Configure Segment Action

Next, configure Segment Revroute (Actions)  to track sales conversion events.

Add Revroute (Actions) destination

Head to Segment Revroute (Actions)  and add the destination to your Segment workspace.

Segment Revroute (Actions) destination

Configure Revroute API Key

In the Revroute (Actions) destination settings, fill out the following fields:

  • Name: Enter a name to help you identify this destination in Segment.
  • API Key: Enter your Revroute API key. You can find this in the Revroute Dashboard .
  • Enable Destination: Toggle this on to allow Segment to send data to Revroute.

Once completed, click Save Changes.

Segment Revroute (Actions) Basic Settings

Add Mapping

Next, depending on the event you want to track, choose the corresponding action from the list of available actions:

Event to trackDefault event nameExample
LeadSign UpA user signs up for an account
SaleOrder CompletedA user purchases a product

Segment Revroute (Actions) Mapping

Below the selected action, you’ll see the mapping for that action.

Segment Revroute (Actions) Mapping

You can customize the trigger and mapping to fit the specific needs of your application.

Finally, click Next and then Save and enable to add the mapping to the destination.

Send conversion events to Revroute

On the server side, you’ll use the @segment/analytics-node SDK to send conversion events to Segment.

Make sure to include relevant properties in the payload:

import { Analytics } from "@segment/analytics-node"; const segment = new Analytics({ writeKey: "<YOUR_SEGMENT_WRITE_KEY>", }); const cookieStore = await cookies(); const clickId = cookieStore.get("dub_id")?.value; segment.track({ userId: id, event: "Sign Up", context: { traits: { name, email, avatar, clickId, }, }, integrations: { All: true, }, });

Once the event is tracked, Segment will forward the conversion data to Revroute based on the mappings you’ve configured.

Supported attributes

View conversion results

And that’s it – you’re all set! You can now sit back, relax, and watch your conversion revenue grow. We provide 3 different views to help you understand your conversions:

Example apps

github

Segment + Next.js App Router Example

Next.js app using Segment to track sales.

Last updated on