Integrate with Customer.io

Updated

How it works

While you can add people manually or upload CSVs, you’ll get the most out of Customer.io when you integrate with us, adding people and tracking the events they perform programmatically.

You can integrate different data sources with Customer.io—your website, mobile apps, databases, and so on.

flowchart LR d{Where does your
data come from?} d-->|Website|a d--->|Mobile App|f(Integrate with a mobile SDK) d--->|Database or Data Warehouse|g(Reverse ETL Integration) a{Will you send
in-app messages?} a-->|Yes|c(Integrate with the
JavaScript Library) a-->|No|e(Integrate with a
Server library) style c fill: #FFEDF0 style e fill: #FFFAE5 style f fill: #E6FAF3 style g fill: #E5FBFE
Integrations (Data In)Description
RecommendedJavaScriptHelps you identify people, send events, etc from your website, and lets you send in-app messages to your website visitors.
Server-side librariesSupport Customer.io in your Node.JS, GoLang, or Python server. If you’re running a web server and want to send in-app messages, you should use our JavaScript library instead.
Mobile SDKsSupport push notifications and in-app messages in your mobile app. We support iOS, Android, React Native (including Expo), and Flutter.
Reverse ETLAdd and update people, events, objects, and relationships from your backend database.
Incoming webhooksTrigger campaigns from any external service that can send data to Customer.io.
Outgoing webhooksSend data to a URL as a part of campaigns. Provides a low/no-code way to integrate Customer.io with external services.
Direct API IntegrationIf you want to integrate with a database or language we don’t yet support, you can integrate directly with our APIs.

Data in and out

Customer.io integrations are separated into two categories: data inAn integration that feeds data into Customer.io. and data outAn integration that sends data out of Customer.io.. You send data into Customer.io, enrich it, and send it out to other services.

You should start by setting up data-in integrations to capture data from your website, mobile apps, and other data sources. Whatever services you want to capture data from, we strongly recommend that you use our SDKs to get data into Customer.io. With our SDKs, you’ll use functions like identify to add people, track to capture the events people perform, and so on.

If you want to send data to other services outside of Customer.io, you can set up data-out integrations. Within each data-out integration, you can set up actionsThe source event and data that triggers an API call to your destination. For example, an incoming identify event from your sources adds or updates a person in our Customer.io Journeys destination. that determine what kinds of data you send to your outbound service.

flowchart LR subgraph a[Data In] direction LR c(Your website) h(Your mobile app) i[(Your
Database)] end subgraph b[Data Out] direction LR e((Customer.io
Journeys)) f(Your analytics
platform) j(Another
Destination) end c-->g-->|Standard/required
integration path|e g-.->f g-.->j h-->g i-->g g((Customer.io))

Your people are your data

In Customer.io—and in most marketing stacks—your “data” typically refers to people who use your services, the things you know about them (their attributes), and the events they perform. You’ll use this data to trigger and personalize messages, so you send the right messages to the right people at the right times.

When you identifyThe Customer.io operation that adds or updates a person. When you identify a person, Customer.io either adds a person if they don’t exist in your workspace, or updates them if they do. Before you identify someone (by their email address or an ID), you can track them anonymously. a person, you’ll capture their attributesA key-value pair that you associate with a person or an object—like a person’s name, the date they were created in your workspace, or a company’s billing date etc. Use attributes to target people and personalize messages. Attributes are analogous to traits in Data Pipelines.—things like their name, email address, and more.

You’ll also track the events people perform. Events make it easy to respond to people’s behaviors in your app or on your website. For example, you can thank people for filling out a form, remind them to complete a purchase, or suggest additional content when they watch a video.

 People aren’t all of your data

We’ve simplified things by talking about people, but you can also capture custom objectsAn object is a non-person entity that you can associate with one or more people—like a company, account, or online course. to represent groups that people are related to—like companies they work for, online classes they take, or recreational sports leagues they belong to.

Plan your integration

Different kinds of data use different functions across the system. Knowing what data you want to capture can help you understand what calls you’ll need to make and when. For example, when you want to record attributes, you’ll use an identify call.

As you integrate with Customer.io, think about the data that you want to store:

You can store all kinds of data in Customer.io. But be careful when handling certain kinds of data. In general, you should not send us sensitive personal information like bank account information, credit card numbers, personal health information and so on.

 You don’t have to store everything in your workspace

Some of our integrations let you forward data to other destinations without having to store it in your workspace.

Integrate with Customer.io

When you integrate with Customer.io, you’ll set up data in integrations, like your website, and then you can send data out to other services—like your analytics platform or your backend database. Most of the work you’ll do to get started is in setting up your data in integrations—your sources of data for Customer.io. Then you can set up and customize the data you forward to other services.

Add a JavaScript integration

In most cases, we suggest that you integrate your website with Customer.io using our client-side JavaScript library because it acts as both a data source and also lets you send in-app messages to your audience. We’ll reference this library in our examples. But we also offer server-side SDKs in other languages.

  1. Go to Data & Integrations > Integrations and click Add Integration.
  2. Find and click the JavaScript integration.
    select the javascript source
    select the javascript source
  3. Enter a Name for your integration, and click Submit. You should give your source a name that helps you identify not only the source medium (“JavaScript” in this case), but helps you identify the resource you’re capturing data from—like “company website” or “community forums.”
    configure the javascript source
    configure the javascript source
  4. Under Installation Instructions, you’ll find relevant code that you need to add to your website. Using our JavaScript client as an example, you’ll paste the code snippet in your website’s <head> tag.

You’re now ready to start sending calls to Customer.io. But we also recommend that you incorporate in-app messaging support so you can send relevant messages to your website visitors.

Add in-app messaging support

If you want to support in-app messaging, you’ll need to add a couple of lines to the JavaScript snippet.

  1. Go to Settings > Workspace Settings and click Get Started next to In-App.

  2. Click Enable in-app.

  3. Return to your Workspace Settings and go to API and Webhook Credentials.

  4. Copy the Site ID for the set of credentials that you want to send your in-app messages from. If you don’t have a set of credentials, click Create Tracking API Key.

    find your site ID
    find your site ID
  5. Paste the Site ID into your JavaScript snippet or SDK configuration.

     !function(){var i="cioanalytics", analytics=(window[i]=window[i]||[]);if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.setAttribute('data-global-customerio-analytics-key', i);t.src="https://cdp.customer.io/v1/analytics-js/snippet/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._writeKey=key;analytics._loadOptions=e};analytics.SNIPPET_VERSION="4.15.3";
         analytics.load(
             "YOUR_API_KEY",
             {
                 "integrations": {
                     "Customer.io In-App Plugin": {
                     siteId: "YOUR_SITE_ID"
                     }
                 }
             }
         );
         analytics.page();
     }}();
     
    

Now you’re ready to send in-app messages to your website visitors!

Add Destinations

Destinations are the places you want to send, and act on, data. Sending your Customer.io data to all the places where it’s useful to you eliminates “data gaps” in your stack.

Check out our destination catalog to see all the destinations we support. If you don’t find one you need, let us know!

  1. Go to the Data Pipelines tab and click Connections.
  2. Click Add New under Destinations.
  3. Select the Destination you want.
    Find your new destination
    Find your new destination
  4. (Optional) Select the sources that you want to connect to this destination. You can always connect sources to your destination later.
    Select the sources you want to add to your destination
    Select the sources you want to add to your destination
  5. Configure your destination and click Continue. We’ve provided an example of the Customer.io Journeys destination, but yours may contain different fields based on the destination you pick.
    configure your destination's settings
    Example Customer.io Journeys destination settings
    configure your destination's settings
  6. Click Enable Destination.

Now your destination is set up and will start accepting data from your sources. If you want to tailor the data that your sources send to destinations, go to your destination’s actionsThe source event and data that triggers an API call to your destination. For example, an incoming identify event from your sources adds or updates a person in our Customer.io Journeys destination. tab. See Actions for more information.

Integrate your mobile app(s)

While you can write your own integration with our APIs, we strongly suggest that you integrate your mobile apps using our SDKs.

At a basic level, you must use our SDKs if you intend to send in-app messages. Beyond that, they’re already set up to help you identify people, track events, and receive push notifications, making it easy to get set up with Customer.io without writing all your own code from scratch.

When you integrate mobile apps, you’ll need to enable push and in-app messaging in your workspace. You’ll also need to set up push notifications with your push provider. See our Push Notifications documentation for more information.

Database and Reverse ETL integrations

We offer a number of reverse ETL integrations that help you send data from your database into Customer.io. If you already aggregate your data in a database or data warehouse, you can use a reverse ETL integration to keep your Customer.io workspace up to date with your latest data.

Copied to clipboard!
  Contents
Is this page helpful?