Skip to content

Commit e598cfb

Browse files
committed
c.io updates
1 parent aab239b commit e598cfb

File tree

1 file changed

+4
-252
lines changed
  • src/connections/destinations/catalog/customer-io

1 file changed

+4
-252
lines changed

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

Lines changed: 4 additions & 252 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ For that, you need to make the following calls:
165165
}
166166
```
167167

168-
## Application Opened
168+
## Application Opened
169+
169170
[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).
170171

171172
{% comment %} api-example '{
@@ -202,7 +203,8 @@ For that, you need to make the following calls:
202203
}
203204
```
204205

205-
## Application Uninstalled
206+
## Application Uninstalled
207+
206208
[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).
207209

208210

@@ -276,253 +278,3 @@ For user-property destinations, an [identify](/docs/connections/spec/identify/)
276278
> Customer.io requires you to pass an identifier value (ID or email, depending on your workspace settings), when you sync Audiences or Computed Traits.
277279
278280
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.
279-
---
280-
title: Customer.io Destination
281-
rewrite: true
282-
redirect_from: "/connections/destinations/catalog/customer.io/"
283-
hide-personas-partial: true
284-
---
285-
286-
[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).
287-
288-
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)!
289-
290-
> success ""
291-
> **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!
292-
293-
294-
## Getting Started
295-
296-
{% include content/connection-modes.md %}
297-
298-
To connect Customer.io as a Segment destination:
299-
1. Navigate to **Connections > Destinations** in Segment.
300-
2. Click **Add Destination**.
301-
3. Search for `Customer.io` and select it.
302-
4. Click **Configure Customer.io** and choose which source to connect the destination to.
303-
5. Enter your settings for these fields and click **Save**:
304-
305-
Field | Details
306-
----- | -------
307-
Destination Name | The name you want to identify the destination with.
308-
Connection Mode | You can choose between **Cloud Mode** and **Device Mode**. Segment recommends using Cloud Mode.
309-
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.
310-
311-
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**.
312-
7. Click the toggle to activate the integration and start sending data to your Customer.io destination.
313-
314-
If you want to sync your settings directly from your Customer.io workspace instead, go to **Settings > Integrations** and find the **Segment Destination** integration. .
315-
316-
![Segment Destination in Customer.io](images/segment-destination-cio.png)
317-
318-
## Page
319-
320-
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:
321-
322-
```javascript
323-
analytics.page();
324-
```
325-
326-
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.
327-
328-
## Screen
329-
330-
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:
331-
332-
```objc
333-
[[SEGAnalytics sharedAnalytics] screen:@"Home"];
334-
```
335-
336-
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`.
337-
338-
339-
## Identify
340-
341-
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:
342-
343-
```javascript
344-
analytics.identify('userId123', {
345-
346-
});
347-
```
348-
349-
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`.
350-
351-
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.
352-
353-
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:
354-
355-
```javascript
356-
analytics.identify('userId123', {
357-
358-
unsubscribed: true
359-
}
360-
)
361-
```
362-
## Track
363-
364-
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:
365-
366-
```javascript
367-
analytics.track('Clicked Button');
368-
```
369-
370-
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.
371-
372-
## Device Token Set up
373-
374-
Set `device.token` before you send the `Application Installed`, `Application Uninstalled`, or `Application Opened` events to Segment.
375-
376-
For that, you need to make the following calls:
377-
378-
- For Android, you need to make a call to `putDeviceToken` when Segment client initializes.
379-
- Read [more here](/docs/connections/sources/catalog/libraries/mobile/android/#how-should-i-use-outbounds-push-notifications) for adding tokens for Android devices
380-
- For iOS, you need to make a call to `segment.registeredForRemoteNotifications` when you receive the `didRegisterForRemoteNotificationsWithDeviceToken` event.
381-
- Read [more here](/docs/connections/sources/catalog/libraries/mobile/ios/#how-do-i-use-push-notifications) for adding tokens for iOS devices
382-
383-
## Application Installed
384-
385-
[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).
386-
387-
{% comment %} api-example '{
388-
"action": "track",
389-
"userId": "019mr8mf4r",
390-
"event": "Application Installed",
391-
"properties": {
392-
"version": "1.2.3",
393-
"build": 1234
394-
},
395-
"context": {
396-
"device": {
397-
"token": "ff15bc0c20c4aa6cd50854ff165fd265c838e5405bfeb9571066395b8c9da449",
398-
"type": "ios"
399-
}
400-
}
401-
}'}}} {% endcomment %}
402-
403-
```js
404-
{
405-
"action": "track",
406-
"userId": "019mr8mf4r",
407-
"event": "Application Installed",
408-
"properties": {
409-
"version": "1.2.3",
410-
"build": 1234
411-
},
412-
"context": {
413-
"device": {
414-
"token": "ff15bc0c20c4aa6cd50854ff165fd265c838e5405bfeb9571066395b8c9da449",
415-
"type": "ios"
416-
}
417-
}
418-
}
419-
```
420-
421-
## Application Opened
422-
[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).
423-
424-
{% comment %} api-example '{
425-
"action": "track",
426-
"userId": "019mr8mf4r",
427-
"event": "Application Opened",
428-
"properties": {
429-
"version": "1.2.3",
430-
"build": 1234
431-
},
432-
"context": {
433-
"device": {
434-
"token": "ff15bc0c20c4aa6cd50854ff165fd265c838e5405bfeb9571066395b8c9da449",
435-
"type": "ios"
436-
}
437-
}
438-
}'}}} {% endcomment %}
439-
440-
```js
441-
{
442-
"action": "track",
443-
"userId": "019mr8mf4r",
444-
"event": "Application Opened",
445-
"properties": {
446-
"version": "1.2.3",
447-
"build": 1234
448-
},
449-
"context": {
450-
"device": {
451-
"token": "ff15bc0c20c4aa6cd50854ff165fd265c838e5405bfeb9571066395b8c9da449",
452-
"type": "ios"
453-
}
454-
}
455-
}
456-
```
457-
458-
## Application Uninstalled
459-
[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).
460-
461-
462-
{% comment %} api-example '{
463-
"action": "track",
464-
"userId": "019mr8mf4r",
465-
"event": "Application Uninstalled",
466-
"properties": {
467-
"version": "1.2.3",
468-
"build": 1234
469-
},
470-
"context": {
471-
"device": {
472-
"token": "ff15bc0c20c4aa6cd50854ff165fd265c838e5405bfeb9571066395b8c9da449",
473-
"type": "ios"
474-
}
475-
}
476-
}'}}} {% endcomment %}
477-
478-
```js
479-
{
480-
"action": "track",
481-
"userId": "019mr8mf4r",
482-
"event": "Application Uninstalled",
483-
"properties": {
484-
"version": "1.2.3",
485-
"build": 1234
486-
},
487-
"context": {
488-
"device": {
489-
"token": "ff15bc0c20c4aa6cd50854ff165fd265c838e5405bfeb9571066395b8c9da449",
490-
"type": "ios"
491-
}
492-
}
493-
}
494-
```
495-
496-
### Sending Data from Customer.io
497-
498-
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.
499-
500-
To enable this feature, go to the Account Settings in Customer.io and add your Segment write key:
501-
502-
![Send email events from Customer.io](images/customerio_streaming_data_out.png)
503-
504-
505-
## Best Practices
506-
507-
### Rate Limits
508-
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.
509-
510-
## Troubleshooting
511-
512-
### No Events in Customer.io from the Browser
513-
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.
514-
515-
### Page events not associated with user
516-
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.
517-
518-
519-
## Personas
520-
521-
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).
522-
523-
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`.
524-
525-
> note ""
526-
> Customer.io requires you to pass a `userId` value when you sync Audiences or Computed Traits.
527-
528-
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)