Iterable supports a two way integration with Segment-- data can flow into Iterable from Segment and vice versa.
Segment → Iterable
You can send data from Segment to Iterable. To set this up, go to Integrations → API Config on the left side menu.
Click the "Enable with Segment" button to send data to Iterable from Segment.
When you call `identify` with one of Segment’s libraries, we’ll call Iterable’s update user endpoint, to add data for that particular user. All users are keyed by `email` in Iterable. If you want to use a `userId` for subsequent `identify` calls, first call identify with both a `userId` and `email`. You can also call identify to update user fields. If you need to update the user’s email address in Iterable, you will need to call our /users/updateEmail API directly.
- First `identify` with both `userId` and `email`
- Subsequent `identify` with `userId`
When you call `track` with one of Segment’s libraries, we’ll call Iterable’s track API endpoint, and send over the event properties as the data fields in the request. The name of the `track` event will show up as a Custom Event in Iterable, and will be available to trigger workflows, segment users, and view analytics.
If a user does not already exist in Iterable, calling `track` for a user event will add that user into the system. You can track with either an `email` or userId (if a `userId` exists for that email).
- First `track` event call with `userId` and `email`; user will be created.
- Best practice is to supply an `email` in every track call. If you can be fully confident that a previous `identify` or `track` call has already been made with the user's email, then subsequent `track` calls can just include `userId` and omit `email`.
Calling `page` to track pageviews will register as a custom event within Iterable. If you have a page called “shoppingCart” the custom event will be called “shoppingCart page” within Iterable.
If a user does not already exist in Iterable, calling `page` for a user event will add that user into the system. Be sure to pass in the `email` the first time you call page for a user, since Iterable keys users by `email`. After the first time, you can call page with `userId`.
1. Call `page` with `userId` and `email`; if with `email` and the `email` doesn’t exist, the user will be created.
You can also send info from your Iterable campaigns to Segment. To turn on this integration, go to Integrations -> Third Party:
Add a new integration and choose 'Segment'.
Locate and enter your Segment write key.
Iterable will send the email events as track calls to Segment in accordance to this doc. If you are using Iterable for mobile push notifications, Iterable can also send push delivery, bounce and open events as track calls to Segment.