Send your event data from RudderStack to Customer.io.
7 minute read
Customer.io is a popular marketing platform for sending targeted emails and push and SMS notifications to improve customer engagement and overall conversion rate.
Find the open source transformer code for this destination in the GitHub repository.
Getting started
RudderStack supports sending event data to Customer.io via the following connection modes:
Connection Mode
Web
Mobile
Server
Device mode
Supported
-
-
Cloud mode
Supported
Supported
Supported
In a web device mode integration, that is, using JavaScript SDK as a source, RudderStack loads the Customer.io native SDK from the https://assets.customer.io/ domain. Based on your website’s content security policy, you might need to allowlist this domain to load the Customer.io SDK successfully.
Once you have confirmed that the platform supports sending events to Customer.io, follow these steps:
From your RudderStack dashboard, add the source. From the list of destinations, select Customer.io.
Assign a name to the destination and click Continue.
Connection settings
The connection settings required to configure Customer.io as a destination in RudderStack are listed below:
Site ID: Enter your Customer.io site ID.
API Key: Enter your Customer.io API key.
For more information on obtaining your Customer.io site ID and API key, see FAQ.
Event sent after setting device token: Enter the name of the event that is fired immediately after setting the device token.
Data center: Choose your Customer.io data center from US or EU.
Client-side Events Filtering: This setting lets you specify which events should be blocked or allowed to flow through to Customer.io. For more information on this setting, see the Client-side Events Filtering guide.
Consent settings
OneTrust Cookie Categories: This setting lets you associate OneTrust cookie consent groups to Customer.io. For more information on this setting, see the OneTrust Consent Manager guide.
Ketch Consent Purposes: This setting lets you associate Ketch consent purposes to Customer.io. For more information on this setting, see the Ketch Consent Manager guide.
Web SDK settings
Use native SDK to send events: Turn on this setting to send the events through Customer.io’s native JavaScript SDK.
Send page name in SDK mode: When sending events in web device mode using the native web SDK, RudderStack sends the page name to Customer.io if this setting is toggled on. Otherwise, Customer.io fetches the page name in the form of a URL.
Enable in-app message support: Turn on this setting to send in-app messages to your website using the native web SDK. For more information on setting up in-app messages for your website, see the Customer.io documentation.
Identify
The identify call lets you identify a visiting user and associate them to their actions. It also lets you record the traits about them like their name, email address, etc.
userId is a mandatory field for Customer.io.
If it is not present, RudderStack:
Uses email in cloud mode. If email is absent too, it drops the event.
RudderStack also sends the createdAt field as created_at to Customer.io to register the user signup time. If it is not present in the event, RudderStack automatically assigns the event’s timestamp to created_at before sending it to Customer.io.
Make sure the user ID and the email values match the Customer.io attributes. You can verify this by selecting that user in the People page in your Customer.io dashboard and clicking on Attributes.
Track
The track call lets you record the user actions along with their associated properties and send them to Customer.io.
For anonymous users, Customer.io does not permit an event name of size more than 100 Bytes. RudderStack automatically trims the event names in such a scenario.
If you are using a native web SDK, RudderStack loads the Customer.io JavaScript snippet and captures the page views automatically. You can also send the page event to record the page views along with the other page-related information.
A sample page call is as shown below:
// "home" is the name of the page.
rudderanalytics.page("home",{path:"path",url:"url",title:"title",search:"search",referrer:"referrer",});
Screen
The screen call is the mobile equivalent of the page call. It lets you record the screen views on your mobile app along with other relevant information about the screen.
If you have enabled screen views in your app implementation in the iOS or Android SDK, RudderStack registers the screen views as Viewed <screen_name> Screen under the user’s Activities tab.
RudderStack also forwards the event properties to Customer.io as received.
A sample screen call using RudderStack’s iOS SDK is shown below:
RudderStack transforms the above event as Viewed Main Screen before sending it to Customer.io.
Group
The group call lets you link an identified user with a group, such as a company, organization, or an account. It also lets you record any custom traits or properties associated with that group and send this information to Customer.io.
The alias call lets you merge different identities of a known user. It is an advanced method that lets you change the tracked user’s ID explicitly.
The alias call is applicable only when both the user identities are present in Customer.io. The mapping can be ID to ID, email to email, email to ID, and ID to email.
A sample alias call is as shown below:
rudderanalytics.alias("userId","previousId");
You can merge two accounts using email as well. RudderStack sets the primary email as userId and secondary email as previousId.
A sample alias call merging two accounts is shown:
To use this feature, enable the trackApplicationLifecycleEvents feature in your mobile SDK implementation code. Also, you need to register your device token after initializing the SDK.
The following snippets demonstrate registering the device token for iOS and Android:
You can also specify the event name to be fired after setting the device token using the Event sent after setting device token dashboard setting.
Make sure you fire the event just after setting the device token in your app, so RudderStack can immediately register the device token on that event and not delay until the next lifecycle event.
The following snippets demonstrate how you can send a device_token_registered event after setting the device token in your app:
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.