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 than ever. 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).
8
+
[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
9
10
-
This document was last updated on January 26, 2018. If you notice any gaps, out-dated information or simply want to leave some feedback to help us improve our documentation, [let us know](https://segment.com/help/contact)!
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)!
11
11
12
12
> success ""
13
13
> **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,50 +17,62 @@ This document was last updated on January 26, 2018. If you notice any gaps, out-
17
17
18
18
{% include content/connection-modes.md %}
19
19
20
-
1. From the Segment web app, click **Catalog**.
21
-
2. Search for "Customer.io" in the Catalog, select it, and choose which of your sources to connect the destination to.
22
-
3. In the destination settings, enter your Customer.io `API Key` and `Site ID`, which you can retrieve from Settings > [API Credentials](https://fly.customer.io/account/api_credentials) in Customer.io, into the Segment UI Settings.
23
-
4. Alternatively, you can automatically sync your Customer.io connection settings to your desired Segment source by following the flow within the Customer.io set up Guide.
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**:
24
26
25
-

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.
26
32
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.
35
+
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. .
37
+
38
+

27
39
28
40
## Page
29
41
30
-
If you're not familiar with the Segment Specs, take a look to understand what the [Page method](https://segment.com/docs/connections/spec/page/) does. An example call would look like:
42
+
If you're not familiar with the Segment Specs, take a look to understand what the [Page method](/docs/connections/spec/page/) does. An example call would look like:
31
43
32
44
```javascript
33
45
analytics.page();
34
46
```
35
47
36
-
Page events will be sent to Customer.io as a `Page View` event where name and properties are optional. In the Customer.io "Activity View", the event will have "Activity Type" set to "Page View" and "Activity Name" set to the page name. If no page name has been specified, "Activity Name" will default to the page URL.
48
+
Page events send to Customer.io as a `Page View` event where names and properties are optional. In the Customer.io "Activity View", the event will have "Activity Type" set to "Page View" and "Activity Name" set to the page name. If there is no page name, "Activity Name" defaults to the page URL.
37
49
38
50
## Screen
39
51
40
-
If you're not familiar with the Segment Specs, take a look to understand what the [Screen method](https://segment.com/docs/connections/spec/screen/) does. An example call would look like:
52
+
If you're not familiar with the Segment Specs, take a look to understand what the [Screen method](/docs/connections/spec/screen/) does. An example call would look like:
41
53
42
54
```objc
43
55
[[SEGAnalytics sharedAnalytics] screen:@"Home"];
44
56
```
45
57
46
-
Screen events will be sent to Customer.io as a custom event. In the Customer.io "Activity View", "Activity Type" will be `event` and "Activity Value" will be set to `Viewed {screen name} Screen`. For the earlier example the "Activity Value" will be `Viewed Home Screen`. If no screen name has been specifed then "Activity Value" will be `Viewed Undefined Screen`.
58
+
Screen events send to Customer.io as a custom event. In the Customer.io "Activity View", "Activity Type" is `event` and "Activity Value" sets to `Viewed {screen name} Screen`. For the earlier example the "Activity Value" will be `Viewed Home Screen`. If there is no screen name, then "Activity Value" will be `Viewed Undefined Screen`.
47
59
48
60
49
61
## Identify
50
62
51
-
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](https://segment.com/docs/connections/spec/identify/) does. An example call would look like:
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:
An email address is not required by Customer.io. It is 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`.
71
+
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`.
60
72
61
-
When you identify a new user, the user will be subscribed to Customer.io. If the user is already subscribed, the user attributes will be updated according to the traits provided.
73
+
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.
62
74
63
-
To unsubscribe a user, simply 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:
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:
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](https://segment.com/docs/connections/spec/track/) does. An example call would look like:
86
+
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:
75
87
76
88
```javascript
77
89
analytics.track('Clicked Button');
78
90
```
79
91
80
-
Track events will be sent to Customer.io as `custom events`. In the Customer.io "Activity View", "Activity Type" will be set to `event` and "Activity Name" will be set to the event name.
92
+
Track events send to Customer.io as `custom events`. In the Customer.io "Activity View", "Activity Type" sets to `event` and "Activity Name" sets to the event name.
81
93
82
94
## Device Token Set up
83
95
84
-
Before you can send the `Application Installed`, `Application Uninstalled`, or `Application Opened` events to Segment. `device.token` must be set.
96
+
Set `device.token` before you send the `Application Installed`, `Application Uninstalled`, or `Application Opened` events to Segment.
85
97
86
98
For that, you need to make the following calls:
87
99
88
-
- For Android, you need to make a call to `putDeviceToken` when Segment client is initialized.
89
-
- Read [more here](https://segment.com/docs/connections/sources/catalog/libraries/mobile/android/#how-should-i-use-outbounds-push-notifications) for adding tokens for Android devices
100
+
- For Android, you need to make a call to `putDeviceToken` when Segment client initializes.
101
+
- Read [more here](/docs/connections/sources/catalog/libraries/mobile/android/#how-should-i-use-outbounds-push-notifications) for adding tokens for Android devices
90
102
- For iOS, you need to make a call to `segment.registeredForRemoteNotifications` when you receive the `didRegisterForRemoteNotificationsWithDeviceToken` event.
91
-
- Read [more here](https://segment.com/docs/connections/sources/catalog/libraries/mobile/ios/#how-do-i-use-push-notifications) for adding tokens for iOS devices
103
+
- Read [more here](/docs/connections/sources/catalog/libraries/mobile/ios/#how-do-i-use-push-notifications) for adding tokens for iOS devices
92
104
93
105
## Application Installed
94
106
95
-
[Application Installed](https://segment.com/docs/connections/spec/mobile/#application-installed) events will add or update a device in the person's Customer.io profile using [this](https://customer.io/docs/api/#apitrackcustomersdevices_update) API endpoint. Note, you must pass a device token in your event payload using a `context.device.token` property. See more on Contextual properties [here](https://segment.com/docs/connections/spec/common/#context).
107
+
[Application Installed](/docs/connections/spec/mobile/#application-installed) events will add or update a device in the person's Customer.io profile using [this](https://customer.io/docs/api/#apitrackcustomersdevices_update) API endpoint. Note, you must pass a device token in your event payload using a `context.device.token` property. See more on Contextual properties [here](/docs/connections/spec/common/#context).
96
108
97
109
{% comment %} api-example '{
98
110
"action": "track",
@@ -129,7 +141,7 @@ For that, you need to make the following calls:
129
141
```
130
142
131
143
## Application Opened
132
-
[Application Opened](https://segment.com/docs/connections/spec/mobile/#application-opened) events will add or update a device 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[here](https://segment.com/docs/connections/spec/common/#context).
144
+
[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).
133
145
134
146
{% comment %} api-example '{
135
147
"action": "track",
@@ -166,7 +178,7 @@ For that, you need to make the following calls:
166
178
```
167
179
168
180
## Application Uninstalled
169
-
[Application Uninstalled](https://segment.com/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[here](https://segment.com/docs/connections/spec/common/#context).
181
+
[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).
170
182
171
183
172
184
{% comment %} api-example '{
@@ -205,7 +217,7 @@ For that, you need to make the following calls:
205
217
206
218
### Sending Data from Customer.io
207
219
208
-
Customer.io supports sending [email events](/docs/connections/spec/email/) to other tools on the Segment platform. These events will be sent as `track` calls to the other destinations you've turned on.
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.
209
221
210
222
To enable this feature, go to the Account Settings in Customer.io and add your Segment write key:
211
223
@@ -215,22 +227,22 @@ To enable this feature, go to the Account Settings in Customer.io and add your S
215
227
## Best Practices
216
228
217
229
### Rate Limits
218
-
Customer.io has limits on the data collected by their API. To ensure your events arrive in Customer.io, make sure that you are respecting the limits placed on the [Customer.io API](https://learn.customer.io/api/#api-documentationlimits). If you are using our[HTTP API](/docs/connections/sources/catalog/libraries/server/http/) to send a batch of events to Customer.io at once, make sure you throttle the `import` to 100-200 requests per second.
230
+
Customer.io has limits on the data collected by their API. To ensure your events arrive in Customer.io, make sure that you're respecting the limits placed on the [Customer.io API](https://learn.customer.io/api/#api-documentationlimits). If you're using Segment's[HTTP API](/docs/connections/sources/catalog/libraries/server/http/) to send a batch of events to Customer.io at once, make sure you throttle the `import` to 100-200 requests per second.
219
231
220
232
## Troubleshooting
221
233
222
234
### No Events in Customer.io from the Browser
223
-
Remember that before we can send events to Customer.io from client-side Javascript the current user must be identified with their `userId`. The user's email address can only be used to identify them if that is the id on record for them in Customer.io.
235
+
Remember that before Segment can send events to Customer.io from client-side Javascript, the current user must identify with their `userId`. The user's email address is only used to identify them if that is the ID on record for them in Customer.io.
224
236
225
-
### Page events not being associated with user
226
-
Page events will only be associated to a user if the user has been previously identified in Customer.io. If you identify a user after making Page calls, the previous page events will not be associated to the user in Customer.io.
237
+
### Page events not associated with user
238
+
Page events will associate to a user if the user has been previously identified in Customer.io. If you identify a user after making Page calls, the previous page events won't associate to the user in Customer.io.
227
239
228
240
229
241
## Personas
230
242
231
-
You can send computed traits and audiences generated using [Segment Personas](/docs/personas) to this destination as a **user property**. To learn more about Personas, contact us for a [demo](https://segment.com/contact/demo).
243
+
You can send computed traits and audiences generated using [Segment Personas](/docs/personas) to this destination as a **user property**. To learn more about Personas, contact Segment for a [demo](https://segment.com/contact/demo).
232
244
233
-
For user-property destinations, an [identify](/docs/connections/spec/identify/) call is sent to the destination for each user being 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`.
245
+
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`.
234
246
235
247
> note ""
236
248
> Customer.io requires you to pass a `userId` value when you sync Audiences or Computed Traits.
0 commit comments