Upgrade Customer.io SDK from 1.x to 2.x (Retention-Ready Tracking)

Customer.io partner logo

Table of Contents

Summarize this documentation using AI

This banner was added using fs-inject

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Overview

If you’re upgrading your app tracking from 1.x to 2.x, treat it less like a “library update” and more like tightening the inputs that power your Customer.io retention engine. When the SDK upgrade is done right, cart recovery becomes timely, repeat purchase flows stop missing purchasers, and reactivation audiences stop getting polluted by anonymous users who were never stitched correctly.

If you want a second set of eyes on identity stitching and event parity before you ship, book a strategy call—most issues don’t show up until you try to segment on the new events and realize half your users are split across profiles.

How It Works

The 2.x SDK pattern is all about getting three things reliably correct in your app: initialization, identity, and event payloads. In practice, retention performance lives or dies on whether the same human ends up on one profile and whether their “meaningful moments” arrive as clean events with consistent properties.

  • Initialize early, track consistently: the SDK needs to start early enough in the app lifecycle to capture sessions, screens, and key commerce actions (product views, add-to-cart, checkout started) without gaps.
  • Identity stitching is the real upgrade: you want anonymous browsing behavior (pre-login) to merge into the known customer profile the moment you have a stable identifier (email, customer ID). If you delay identify calls or change identifiers midstream, you’ll fragment users and your cart recovery triggers won’t match the right person.
  • Event parity matters more than “more events”: keep your core retention events identical across versions (names + properties). If 1.x sent Added to Cart with sku and 2.x sends add_to_cart with product_id, your existing segments and automations won’t fire the way you think they will.
  • Device registration impacts push: if your push channel depends on SDK-managed device tokens, validate that device association survives the upgrade (especially across logout/login and app reinstalls).

Real D2C scenario: a shopper browses anonymously, adds a product to cart, then creates an account at checkout. If your 2.x implementation identifies only after purchase (or uses a different ID than your backend), the “Cart Abandonment” campaign will either never trigger or will trigger to a ghost profile with no email/push token. The fix is almost always: identify earlier, and merge anonymous activity into the known profile using one stable identifier.

Step-by-Step Setup

Before you touch code, align on what “done” means: event parity with 1.x, no identity fragmentation, and no drop in deliverable audiences for your core retention flows (abandonment, post-purchase, winback). Then implement the upgrade in a way you can validate in Customer.io activity logs.

  1. Inventory your current 1.x tracking contract
    • Export a list of event names used in live campaigns/segments (cart, checkout, purchase, product view, subscription state, etc.).
    • For each event, document required properties (e.g., order_id, value, currency, sku, quantity).
    • List person attributes you rely on for segmentation (e.g., email, phone, first_purchase_at, last_purchase_at, lifetime_value, push_enabled).
  2. Install the 2.x SDK alongside a clean environment plan
    • Use a dev/staging workspace or a clearly labeled environment so test traffic doesn’t pollute production segments.
    • Decide whether you’ll dual-send (1.x and 2.x in parallel) for a short window. In most retention programs, dual-send is worth it if you have complex automations tied to event names.
  3. Implement initialization at app start
    • Initialize the SDK as early as practical (app launch) so you don’t miss sessions and early funnel events.
    • Confirm the SDK is pointing at the correct Customer.io site/workspace credentials for that environment.
  4. Implement identity correctly (this is the make-or-break step)
    • Anonymous first: allow the SDK to collect anonymous activity before login/signup.
    • Identify immediately when you have a stable ID: on signup, login, or email capture—call identify with your canonical identifier (typically your internal customer_id or a consistent user_id).
    • Attach traits at identify time: set email, phone, and core segmentation traits right away so abandonment and post-purchase can message without waiting for a backend sync.
    • Handle logout explicitly: decide how you want to treat a logged-out device. If you don’t reset/clear appropriately, you can end up attributing one customer’s browsing to another customer who logs in later on the same device.
  5. Recreate your core commerce events with strict parity
    • Keep event names identical where possible to avoid rebuilding segments and campaigns.
    • Keep property keys consistent and typed consistently (numbers as numbers, timestamps as timestamps).
    • For cart and checkout events, include identifiers that let you dedupe and troubleshoot: cart_id, checkout_id, session_id (if available).
  6. Validate in Customer.io with real devices
    • Use the Activity Log and a known test user to confirm: anonymous events arrive, identify merges, then subsequent events land on the same profile.
    • Confirm push tokens (if applicable) attach to the identified profile and persist across app restarts.
    • Run a test: anonymous add-to-cart → login → abandon. Make sure the cart abandonment trigger finds the identified profile with a reachable channel.
  7. Cut over and monitor audience impact
    • Watch segment sizes for your highest-leverage flows (abandonment, post-purchase cross-sell, replenishment, winback).
    • Monitor duplicate profiles and sudden drops in “reachable by push/email” counts.

When Should You Use This Feature

Most teams upgrade because they “need to,” but the retention win comes from using 2.x as a forcing function to fix identity and event quality. If your app is a meaningful revenue channel, this upgrade is one of the highest-leverage tracking projects you can do for lifecycle revenue.

  • Cart recovery is underperforming: you see lots of add-to-cart events but low triggered volume, or messages go to the wrong person. That’s usually identity stitching + event parity.
  • Repeat purchase flows misfire: post-purchase upsells hit people who never bought, or replenishment misses buyers. That’s often purchase event consistency and dedupe keys.
  • Reactivation audiences are noisy: “inactive 60 days” includes people who are active on another profile/device. That’s fragmented identity across anonymous/known users.
  • Push performance is unstable: tokens aren’t attached to the right profile after login/logout or reinstall. That’s device association and identity handling.

Operational Considerations

Upgrading SDKs tends to break in the handoff between app events, backend truth, and how Customer.io segments actually evaluate users. Plan for the orchestration realities, not the happy-path demo.

  • Segmentation depends on stable keys: if your events change names/properties, you’ll silently shrink segments. Keep a mapping doc and update segments intentionally.
  • Data flow timing matters: cart recovery is sensitive to minutes. If identify happens late (after a backend call) you’ll miss the window where the user is still recoverable.
  • Orchestration across channels needs consistent identity: email might still work if you set email late, but push and in-app will be unreliable if device tokens aren’t stitched to the same profile.
  • Duplicate profile resolution: if you’ve historically identified by email sometimes and customer_id other times, 2.x will surface the pain. Decide your canonical ID and stick to it everywhere.

Implementation Checklist

If you run this like a release checklist instead of a code task, you’ll avoid the classic “upgrade shipped, revenue dipped” week. Use this to gate the rollout.

  • Core 1.x event list documented (names + required properties)
  • Canonical identifier chosen (and used consistently across app + backend)
  • Identify called immediately on login/signup/email capture
  • Anonymous pre-login activity merges into identified profile
  • Logout behavior defined and implemented (no cross-user contamination)
  • Purchase event includes order_id and value/currency for dedupe + revenue reporting
  • Cart/checkout events include stable IDs (cart_id/checkout_id)
  • Push token association validated across restart + relogin
  • Segment sizes validated pre/post cutover for top retention flows
  • Monitoring plan in place for duplicates and deliverable audience drops

Expert Implementation Tips

The SDK upgrade is your chance to fix the stuff that quietly drags retention down. These are the moves that tend to create real lift, especially for D2C brands with app-heavy shopping behavior.

  • Identify earlier than you think: if you collect email on a “save your cart” modal, identify there—not at account creation. That single change usually increases recoverable carts.
  • Standardize event naming to protect automations: keep legacy names for anything already wired into revenue workflows. Do a cleanup later once you’ve stabilized.
  • Send a single “Purchase” source of truth: if app and backend both send purchase events, you’ll double-count and break post-purchase suppression. Pick one system to emit the canonical purchase event and include an order_id for dedupe.
  • Use properties that make merchandising easy: include product_name, category, price, and variant on view/add-to-cart. This is what unlocks high-performing browse/cart creatives without complex joins.

Common Mistakes to Avoid

Most “we upgraded and nothing works” stories come down to a few predictable mistakes. Catch these before you roll to 100%.

  • Changing event names without updating segments/campaigns: everything looks fine in logs, but triggers never fire.
  • Using multiple identifiers across surfaces: email in one place, customer_id in another. You’ll create duplicates and your reactivation segments will be wrong.
  • Delaying identify until after purchase: you’ll lose cart recovery and browse-based personalization for anyone who doesn’t complete checkout.
  • Not defining logout behavior: shared devices (tablets, family phones) will contaminate profiles and destroy personalization accuracy.
  • Letting test traffic hit production: QA devices end up in winback flows and skew reporting.

Summary

Upgrade to 2.x when you want cleaner identity stitching and reliable event inputs for retention flows. Treat it as a tracking contract migration: preserve event parity, identify early, and validate segments that drive revenue. If those three are solid, cart recovery and repeat purchase automations usually get more consistent fast.

Implement 2.x Upgrade with Propel

If you’re already running revenue-critical automations in Customer.io, the safest way to upgrade is to validate identity stitching and event parity against the exact segments and triggers that drive your retention program. In practice, this tends to break at the boundaries—anonymous-to-known merge, logout handling, and purchase dedupe—so we focus testing there first.

If you want help scoping the upgrade plan and QA process without slowing down engineering, book a strategy call and we’ll map your current 1.x contract to a 2.x rollout that won’t crater your recoverable audiences.

Contact us

Get in touch

Our friendly team is always here to chat.

Here’s what we’ll dig into:

Where your lifecycle flows are underperforming and the revenue you’re missing

How AI-driven personalisation can move the needle on retention and LTV

Quick wins your team can action this quarter

Whether Propel AI is the right fit for your brand, stage, and stack