Loading…

Migrate from another service

Updated

Our JavaScript snippet works similarly to other platforms, but you may need to do a bit of work to move from another service to Customer.io.

Migrating from Segment

Our calls are nearly identical to Segment’s. We use the same analytics variable and method names, so you won’t have to replace any code. Simply replace your Segment script with our JavaScript client, and you’re all set.

However, Segment supports a wider range of integration destinations than we do. Before you make the switch, check that we support the services you integrate with and the 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 you expect before you move from Segment to Customer.io as your customer data platform (CDP).

If you still use Segment, use our Journeys Web SDK

Our JavaScript client uses the same analytics variable and method names as Segment so you can use our snippet without changing your existing Segment calls. However, if you still use Segment, you should use our Journeys Web SDK to send data to Customer.io.

The Journeys Web SDK uses a different variable than Segment, which prevents conflicts with Segment’s calls and ensures that your data is sent to Customer.io as expected.

Migrating from Customer.io’s JavaScript snippet

Customer.io has two JavaScript libraries—a JavaScript snippet based on our Track API and a newer client that uses our Data Pipelines API.

We recommend that you use the new JavaScript client. If you’re new to Customer.io, you won’t typically see the older JavaScript snippet when you look up JavaScript in our integration directory. The newer JavaScript client makes supports additional features for in-app messaging and has things like retry logic built in; it’s also where we’ll focus our development efforts going forward.

To migrate from the JavaScript snippet to our newer client, you’ll need to:

  • Add the new JavaScript client to your website.
  • Update requests to use analytics rather than _cio and update the structure of your identify calls. Most other requests are the same.

Differences between the new JavaScript client and older JavaScript snippet

With our older snippet, a person’s id was a part of their other attributes. When you use the newer client, the id is its own argument, separate from a person’s attributes.

cioanalytics.identify('12091906-01011992', {
  name: 'cool person',
});
cioanalytics.identify({
  id: '12091906-01011992',
  name: 'cool person',
});

Migrating from Rudderstack

Our calls are nearly identical to Rudderstack’s. However, their calls are attached to rudderanalytics and ours use analytics. You won’t have to replace your calls, but you should change instances of rudderanalytics to analytics after you replace your Rudderstack JavaScript with the JavaScript client.

Keep in mind that Rudderstack supports a wider range of integrations than we do. Before you make the switch, check that we support your integrations and the 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 you expect before you move from Rudderstack to Customer.io as your customer data platform (CDP).

Copied to clipboard!
  Contents
Is this page helpful?