Customer.io Destination Config Reference Beta
- free
- growth
- enterprise
7 minute read
Customer.io is a messaging and marketing automation destination. RudderStack sends events to Customer.io’s APIs from its servers, or through Customer.io’s own SDKs in device mode on web, Android, and iOS.
In a Customer.io destination spec:
type: customeriodefinition_version: 1
Sample configuration
version: rudder/v1
kind: destination
metadata:
name: customerio-prod
spec:
id: customerio-prod
display_name: Customer.io Production
type: customerio
definition_version: 1
enabled: true
config:
site_id: "{{ .CUSTOMERIO_SITE_ID }}"
api_key: "{{ .CUSTOMERIO_API_KEY }}"
datacenter: US
api_version: v2
user_id_identifier_type: id
device_token_event_name: Device Token Registered
send_page_name_in_sdk:
web: true
data_use_in_app:
web: false
auto_track_device_attributes:
android: true
ios: true
background_queue_min_number_of_tasks:
android: "10"
background_queue_seconds_delay:
android: "30"
connection_mode:
web: device
android: device
cloud: cloud
consent_management:
web:
- provider: oneTrust
consents:
- marketingThe above example sends server-side events through the v2 API, and connects web and Android sources in device mode, where the SDK settings apply — see Device mode.
Config keys
config accepts only the keys listed below. The shared config key rules cover unknown keys, defaults, and immutability.
Connection
site_id
RequiredSecretType:
string
Description: Your Customer.io site ID.
Notes:
- At most 100 characters, and must not contain line breaks.
- A
{{ path || fallback }}template is accepted in place of a literal.
api_key
RequiredSecretType:
string
Description:
Your Customer.io API key, paired with site_id.
Notes:
- At most 100 characters, and must not contain line breaks.
- A
{{ path || fallback }}template is accepted in place of a literal.
{{ .VAR }} reference rather than a literal — see Secrets.datacenter
RequiredType:
string
Description: Region of your Customer.io account.
Notes:
USorEU.- The dashboard defaults this field to
US. Rudder CLI requires it explicitly. - A spec that omits this key fails validation.
device_token_event_name
Type:
string
Description: Name of the event your app fires right after it sets the device token, so RudderStack can send the token to Customer.io immediately. Applies in both modes.
Notes:
- At most 100 characters, and must not contain line breaks.
- A
{{ path || fallback }}template is accepted in place of a literal.
Cloud mode
These keys apply to events sent in cloud mode. They have no effect on device-mode delivery.
api_version
Type:
string
Default value:
v2
Description: Customer.io API that delivers cloud-mode events.
Notes:
v2— Customer.io’s unified batch API. Needsuser_id_identifier_type.v1— Customer.io’s per-endpoint APIs.- Omitting this key is the same as setting
v2.
user_id_identifier_type
RequiredType:
string
Description:
Customer.io identifier that receives the RudderStack userId.
Notes:
- Required when
api_versionisv2— including when you omitapi_version, sincev2is the default. Leave it unset only withv1. - One of
id,email,phone, orcio_id. Withphone, the value must read as E.164 — for example+15551234567.
userIdis sent as this identifier for every event, with no fallback — chooseidand send an email address, and it’s sent as an ID. A wrong choice attaches events to the wrong profiles or creates new ones, and that can’t be reversed. Withv2, events without auserIdfail.
Device mode
These keys configure Customer.io’s SDKs, so they apply only to sources connected in device mode. Each is keyed by the source type it applies to.
send_page_name_in_sdk
Type:
object
Description:
Send the page name to Customer.io. When false, Customer.io records the page URL instead.
Notes:
web— boolean. The dashboard defaults it totrue; Rudder CLI doesn’t fill it in.
data_use_in_app
Type:
object
Description: Enable Customer.io in-app messages on your website.
Notes:
web— boolean. The dashboard defaults it tofalse.
auto_track_device_attributes
Type:
object
Description:
Let Customer.io’s mobile SDK track device attributes automatically. Set false to track them yourself.
Notes:
android,ios— booleans. The dashboard defaults both totrue; Rudder CLI doesn’t fill them in.
auto_track_device_attributes:
android: true
ios: falsebackground_queue_min_number_of_tasks
Type:
object
Description: Minimum number of tasks the Android SDK keeps in its background queue.
Notes:
android— a whole number written as a string,"10"rather than10. At most 100 characters, or a template.- The dashboard defaults it to
"10"; Rudder CLI doesn’t fill it in.
background_queue_seconds_delay
Type:
object
Description: Delay, in seconds, that the Android SDK holds events in its background queue.
Notes:
android— a whole number written as a string,"30"rather than30. At most 100 characters, or a template.- The dashboard defaults it to
"30"; Rudder CLI doesn’t fill it in.
Event filtering
Client-side event filtering applies only whenconnection_mode.webisdevice— the dashboard shows these controls only then, and the SDK is what applies the filter. Rudder CLI accepts the block in any mode, but it has no effect on other connections.
event_filtering
Type:
object
Description:
Restricts which track events the web SDK passes to Customer.io, by event name.
Notes:
- Applies when
connection_mode.webisdevice. Leave it unset otherwise. whitelist— array of event names to allow; every othertrackevent is dropped.blacklist— array of event names to drop; every othertrackevent is allowed.- The two are mutually exclusive, and Rudder CLI enforces it — setting both fails validation.
- Each name is at most 100 characters, or a
{{ path || fallback }}template.
Per-source keys
Both keys are objects keyed by the local source type — the tokens listed under Source types. A key naming a source type this destination doesn’t support fails validation.
connection_mode
Type:
object
Description: Maps each source type you connect to the mode its events reach Customer.io in, using the modes in Source types.
Notes:
- An entry is required for each source type you connect — see Connect a source.
- A mode the source type doesn’t support on this destination fails validation — for example
deviceforandroid_kotlin.
connection_mode:
web: device
android: device
ios: cloudconsent_management
Type:
object
Description:
Consent provider configuration per source type. The entry shape, accepted providers, and the rules on resolution_strategy and consents are shared across all destination types — see Consent management.
Source types
Customer.io accepts events from these source types in the mentioned connection modes:
| Source type | Connection mode |
|---|---|
android | cloud, device |
android_kotlin | cloud |
ios | cloud, device |
ios_swift | cloud |
web | cloud, device |
unity | cloud |
cloud | cloud |
react_native | cloud |
flutter | cloud |
cordova | cloud |
web, android, and ios offer device mode. The Kotlin and Swift SDKs — android_kotlin and ios_swift — are cloud only. See Customer.io device mode.
The dashboard additionally offers Customer.io to AMP, Shopify, and Reverse ETL sources. Rudder CLI doesn’t manage those connections, soamp,shopify, andwarehouseare invalid here.
Connect a source
An event stream connection to this destination is checked against two rules at validate time.
The source’s type must be supported. A source’s type resolves to one of the tokens above before the check — a JavaScript source resolves to web, and webhook and server-side SDK sources resolve to cloud. An unsupported type reports:
destination 'customerio-prod' (type 'customerio') does not support source 'my-source':
source type 'amp' is not among supported source types: android, android_kotlin, ...The destination config must carry a connection_mode entry for that source type. This lives on the destination spec, not on the connection spec. Without it:
destination 'customerio-prod' config has no 'connection_mode' entry for source type 'web'Customer.io needs no additional config keys to connect a source of any type, in any mode.
Secrets
api_key and site_id are the secret keys. Write each as a {{ .VAR }} reference and supply the value at apply time:
config:
site_id: "{{ .CUSTOMERIO_SITE_ID }}"
api_key: "{{ .CUSTOMERIO_API_KEY }}"export RUDDER_CUSTOMERIO_SITE_ID="..."
export RUDDER_CUSTOMERIO_API_KEY="..."
rudder-cli apply
# or
rudder-cli apply --var-file secrets.vars.yamlNote that:
- The YAML that
rudder-cli importwrites may or may not include secret keys. Before you apply, make sure every secret key your configuration needs is present and populated through variable substitution. - In web device mode the site ID is embedded in the page’s JavaScript, so masking it protects your YAML, not the value itself.
See How to Use Variable Substitution in Rudder CLI.
See more
- Customer.io Destination for the API key and site ID, and the per-mode settings
- Destination Type Reference for Rudder CLI for the rules shared across destination types
- Destination YAML Reference for the spec envelope