Skip to main content

Segment to Courier

Courier’s Segment destination sends data from your web or mobile app into Courier. Events appear on the in Courier Studio, where you map them to notification workflows. For example, an analytics.identify event can trigger an automation that welcomes a new user. walks that setup end to end. Supported Segment events:
  • analytics.group
  • analytics.identify
  • analytics.track

Connecting Segment

1

Open the Segment Destinations catalog

In the Segment app, open the Destinations catalog page.
2

Add a destination

Click Add Destination.
3

Select the Courier destination

Search the catalog for Courier and select the Courier destination.
4

Choose a source

Choose the Source that sends data to the Courier destination.
5

Get your Courier API Key

On the , search for Segment and open it to get the Courier API Key. If no key is there, copy the Auth Token from the API Keys section of the .
6

Enter the API Key in Segment

In Segment, enter the Courier API Key or Auth Token in the Courier destination’s API Key field.
7

Validate the setup

Open the destination’s “Event Tester” in Segment and click “Send Event” at the bottom of the page. In Courier Studio, refresh or wait a few seconds. The test event appears in the list if setup succeeded.

Identify calls

Segment Identify calls connect a user to their actions (Segment events) and record traits about them. Segment identifies the user by User ID, and the call can carry traits such as name and email. Courier uses those traits to update recipient profiles over time. See the Segment Identify spec and for details. Example payload

Track calls

Segment Track calls record actions your users perform, along with any properties on those actions. See the Segment Track spec for details. Track events appear in Courier with a track/ prefix. Courier reads data from the track’s properties object. Map track events to Courier journeys to send notifications from them. An example Segment API call:
Courier receives that call as a track event:
Courier maps that object into its data object:

Troubleshooting

A persistent “No Segment events received yet.” message usually means Segment could not set up your Courier workspace as a destination. To get the test event through:
  1. Confirm the API Key was copied into Segment exactly.
  2. Check where the email property sits in Segment’s test JSON object. On an identify call it belongs inside the traits object, not at the top level. Move it and resend the test event.
  3. If it still fails, reach out to Courier Support.

Courier to Segment

Configure Courier as a Segment Source, and Courier message and audience events flow back into Segment for analytics.

Setting up Courier as a Segment source

1

Open the Sources page

In Segment, open the Sources page under “Connections”.
2

Select your framework

Select your framework, for example Node.js.
3

Obtain a write key

Segment then shows instructions for adding it to that codebase. Copy the write key from this page.
4

Paste the write key into Courier

In Courier’s Segment configuration, paste your Segment Write Key into the Segment write key field.
Courier starts sending updates to Segment once the write key is saved.

Courier events sent to Segment

With Courier as a Segment source, Segment can track these events:

Message events

  • Message Clicked
  • Message Delivered
  • Message Opened
  • Message Sent
  • Message Undeliverable
  • Message Unroutable

Audience events

  • Audience User Matched
  • Audience User Unmatched

Preferences events

  • User Subscribed
  • User Unsubscribed