Skip to content

Commit 68025ee

Browse files
authored
Merge pull request #10 from segmentio/repo-sync
repo sync
2 parents 8411a43 + 48a6781 commit 68025ee

File tree

3 files changed

+58
-28
lines changed

3 files changed

+58
-28
lines changed
26.1 KB
Loading
250 KB
Loading

src/connections/destinations/catalog/customer-io/index.md

Lines changed: 58 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ redirect_from: "/connections/destinations/catalog/customer.io/"
55
hide-personas-partial: true
66
---
77

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-
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).
119

1210
> success ""
1311
> **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-
1715

1816
{% include content/connection-modes.md %}
1917

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.
3219

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.
3525

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.
3727

3828
![Segment Destination in Customer.io](images/segment-destination-cio.png)
3929

@@ -60,19 +50,47 @@ Screen events send to Customer.io as a custom event. In the Customer.io "Activit
6050
6151
## Identify
6252
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:
6454
6555
```javascript
6656
analytics.identify('userId123', {
6757
6858
});
6959
```
7060

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`.
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.
74+
75+
```javascript
76+
analytics.identify('userId123', {
77+
78+
fav_food: ‘pizza’
79+
});
80+
```
81+
82+
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.
83+
84+
```javascript
85+
analytics.identify('cio_<cio_id value>', {
86+
87+
id: 'new-id-value'
88+
});
89+
```
7290

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.
91+
### Unsubscribing Users
7492

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:
7694

7795
```javascript
7896
analytics.identify('userId123', {
@@ -81,6 +99,13 @@ analytics.identify('userId123', {
8199
}
82100
)
83101
```
102+
103+
### 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+
84109
## Track
85110

86111
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:
140165
}
141166
```
142167

143-
## Application Opened
168+
## Application Opened
169+
144170
[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).
145171

146172
{% comment %} api-example '{
@@ -177,7 +203,8 @@ For that, you need to make the following calls:
177203
}
178204
```
179205

180-
## Application Uninstalled
206+
## Application Uninstalled
207+
181208
[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).
182209

183210

@@ -217,12 +244,15 @@ For that, you need to make the following calls:
217244

218245
### Sending Data from Customer.io
219246

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 youve turned on.
221248

222-
To enable this feature, go to the Account Settings in Customer.io and add your Segment write key:
249+
To enable this feature:
223250

224-
![Send email events from Customer.io](images/customerio_streaming_data_out.png)
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**.
225254

255+
![Segment source in Customer.io](images/segment-source-cio.png)
226256

227257
## Best Practices
228258

@@ -245,6 +275,6 @@ You can send computed traits and audiences generated using [Segment Personas](/d
245275
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`.
246276

247277
> 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.
249279
250280
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

Comments
 (0)