You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Customer.io](https://customer.io/) lets you send automated email, push, SMS, letters, and webhooks based on your customer's activities in your app or product. It makes conversion tracking, optimization and remarketing easier. The `analytics.js` Customer.io Destination is open-source. You can browse the code [on GitHub](https://github.com/segment-integrations/analytics.js-integration-customerio).
9
-
10
-
This document was last updated on January 26, 2018. If you notice any gaps, out-dated information or want to leave some feedback to help improve the documentation, [let us know](https://segment.com/help/contact)!
8
+
[Customer.io](https://customer.io/) helps you send automated email, push, SMS, and webhooks based on your customers' activities in your app or product. It makes conversion tracking, optimization and re-marketing easier. The `analytics.js` Customer.io Destination is open-source. You can browse the code [on GitHub](https://github.com/segment-integrations/analytics.js-integration-customerio).
11
9
12
10
> success ""
13
11
> **Good to know**: This page is about the Customer.io Segment destination, which receives data from Segment. There's also a page about the [Customer.io Segment source](/docs/connections/sources/catalog/cloud-apps/customer-io/), which sends data _to_ Segment!
@@ -17,23 +15,15 @@ This document was last updated on January 26, 2018. If you notice any gaps, out-
17
15
18
16
{% include content/connection-modes.md %}
19
17
20
-
To connect Customer.io as a Segment destination:
21
-
1. Navigate to **Connections > Destinations** in Segment.
22
-
2. Click **Add Destination**.
23
-
3. Search for `Customer.io` and select it.
24
-
4. Click **Configure Customer.io** and choose which source to connect the destination to.
25
-
5. Enter your settings for these fields and click **Save**:
26
-
27
-
Field | Details
28
-
----- | -------
29
-
Destination Name | The name you want to identify the destination with.
30
-
Connection Mode | You can choose between **Cloud Mode** and **Device Mode**. Segment recommends using Cloud Mode.
31
-
How would you like to set up this destination? | You can choose to fill the settings manually or copy the settings from an existing destination instance.
18
+
You can follow the setup guide through Segment using the steps below, or you can automatically sync your Customer.io connection settings to your Segment source using the flow in your Customer.io workspace’s Integrations page.
32
19
33
-
6. Enter your **API Key** and **Site ID** on the Settings tab of your new destination. You can find these in your Customer.io account under **Account Settings > API Credentials**.
34
-
7. Click the toggle to activate the integration and start sending data to your Customer.io destination.
20
+
1. From the Segment web app, click **Connections** > **Destinations**.
21
+
1. Search for “Customer.io”, select it, and then click **Configure Customer.io**.
22
+
1. Select the data sources you want to connect to Customer.io and click **Next**.
23
+
1. Enter your *Destination Name* and select your **Connection Mode**—Cloud Mode or Device Mode. Click **Save**.
24
+
1. Under *Connection Settings*, enter your Customer.io workspace **API Key** and **Site ID**. You’ll find both in your Customer.io *Account Settings* > *API Credentials* page.
35
25
36
-
If you want to sync your settings directly from your Customer.io workspace instead, go to **Settings > Integrations** and find the **Segment Destination** integration. .
26
+
If you want to sync your settings directly from your Customer.io workspace, go to **Settings** > **Integrations** and find the **Segment Destination** integration.
37
27
38
28

39
29
@@ -60,19 +50,47 @@ Screen events send to Customer.io as a custom event. In the Customer.io "Activit
60
50
61
51
## Identify
62
52
63
-
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](/docs/connections/spec/identify/) does. An example call would look like:
53
+
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](/docs/connections/spec/identify/) does. An example call looks like this:
An email address isn't required by Customer.io. It's only needed for people you intend to send email messages to (as opposed to SMS or push notifications). If you want an email to appear in the Customer.io "People View", you must provide an email as a trait labeled `email`.
61
+
When you identify a new user, Customer.io adds the user to your Customer.io workspace. If the user exists, the identify request updates the existing person’s attributes.
62
+
63
+
If your Customer.io workspace supports both `email` and `id` as identifiers (the default setting as of June 2021), you can identify people either by a database identifier (called `id` in Customer.io) or the `email` trait.
64
+
65
+
This provides a path to identify people who enter your system as leads (by email) and then assign them an ID in Customer.io when they become a customer or user.
66
+
67
+
* If you don't have an ID, pass a person's email address as the `userId` in the identify call. Customer.io maps this value to a person's `email` attribute.
68
+
* If you have an ID, set the `userId` in the identify call to the person's ID and pass `email` as a trait. This sets both a person's `id` and `email` attributes in Customer.io. If you previously identified a person by `email`, your request updates that person and assigns them an `id`.
69
+
70
+
71
+
### Updating people
72
+
73
+
When Customer.io recognizes either the `id` or `email` in your request, your identify request updates that person.
If you want to change the `id` or `email` you've assigned a person in Customer.io, you have to pass a person's `cio_id`, in the format `cio_<cio_id value>` as the `userId` in your identify call. Currently, you must retrieve this value from a person's page in the Customer.io interface. In the future, you'll be able to do that using this call from Customer.io API.
When you identify a new user, the user will subscribe to Customer.io. If the user is already subscribed, the user attributes will update according to the traits provided.
91
+
### Unsubscribing Users
74
92
75
-
To unsubscribe a user, pass in `user_id` and `unsubscribed` (with a value of true) in an `identify` call. Be sure the `user_id` and `email` match the values in Customer.io, which you can find in the "Overview" section under the "Attributes" column within an individual user's view in the Customer.io UI. Here is an example of how to unsubscribe a user:
93
+
To unsubscribe a user, simply pass `unsubscribed: true` in an identify call. Be sure the `id` and/or`email`values match the values in Customer.io. You can find these values in Customer.io by selecting a person on the _People_ page, and clicking _Attributes_. Here is an example that unsubscribes a user:
### Identifying people in workspaces that only support ID
104
+
105
+
In older workspaces, or workspaces using Customer.io's "classic" settings, you can only identify people by ID.
106
+
107
+
You do not need to pass an email address unless you want to send emails. If you want to send emails, you must provide the email address as a trait labeled `email`.
108
+
84
109
## Track
85
110
86
111
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does. An example call would look like:
@@ -140,7 +165,8 @@ For that, you need to make the following calls:
140
165
}
141
166
```
142
167
143
-
## Application Opened
168
+
## Application Opened
169
+
144
170
[Application Opened](/docs/connections/spec/mobile/#application-opened) events will add or update a device in the person's Customer.io profile using the same endpoint as above. If a device already exists, Customer.io will update its `last_used_at` timestamp. Again, make sure you pass a device token in your event payload using a `context.device.token` property. See more on [Contextual properties](/docs/connections/spec/common/#context).
145
171
146
172
{% comment %} api-example '{
@@ -177,7 +203,8 @@ For that, you need to make the following calls:
177
203
}
178
204
```
179
205
180
-
## Application Uninstalled
206
+
## Application Uninstalled
207
+
181
208
[Application Uninstalled](/docs/connections/spec/mobile/#application-installed) events will remove the device from the person's Customer.io profile using [this](https://customer.io/docs/api/#apitrackcustomersdevices_delete) API endpoint. Note, you must pass a device token in your event payload using a `context.device.token` property. See more on [Contextual properties](/docs/connections/spec/common/#context).
182
209
183
210
@@ -217,12 +244,15 @@ For that, you need to make the following calls:
217
244
218
245
### Sending Data from Customer.io
219
246
220
-
Customer.io supports sending [email events](/docs/connections/spec/email/) to other tools on the Segment platform. These events send as `track` calls to the other destinations you've turned on.
247
+
You can enable Customer.io as a Segment Source to send[email events](/docs/connections/spec/email/) to other tools on the Segment platform. These events are sent as track calls to the other destinations you’ve turned on.
221
248
222
-
To enable this feature, go to the Account Settings in Customer.io and add your Segment write key:
249
+
To enable this feature:
223
250
224
-

251
+
1. In Customer.io go to **Settings** > **Integrations**.
252
+
2. Find the Segment Source integration.
253
+
3. Add your _Segment Write Key_ and click **Connect Segment**.
225
254
255
+

226
256
227
257
## Best Practices
228
258
@@ -245,6 +275,6 @@ You can send computed traits and audiences generated using [Segment Personas](/d
245
275
For user-property destinations, an [identify](/docs/connections/spec/identify/) call sends to the destination for each user that's added and removed. The property name is the snake_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Personas sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Personas sets that value to `false`.
246
276
247
277
> note ""
248
-
> Customer.io requires you to pass a `userId` value when you sync Audiences or Computed Traits.
278
+
> Customer.io requires you to pass an identifier value (ID or email, depending on your workspace settings), when you sync Audiences or Computed Traits.
249
279
250
280
When you first create an audience, Personas sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.
0 commit comments