Upgrade Customer.io SDK from 3.4x to 4.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 moving from 3.4x to 4.x, treat this as a retention data migration—not a “library bump.” Your Customer.io programs will only recover carts, drive repeat purchase, and reactivate lapsed buyers as well as your identity stitching and event payloads allow. If you want a second set of eyes before you ship, book a strategy call and we’ll pressure-test the tracking plan against your highest-value flows.

In most D2C retention programs, the upgrade tends to break in two places: (1) anonymous-to-known merging (login / checkout) and (2) subtle event schema drift that quietly kills segments and downstream journey triggers.

How It Works

In practice, the 3.4x → 4.x upgrade is about keeping three things consistent: who the user is, what they did, and when they did it—across app sessions and devices. Your SDK is responsible for generating anonymous activity, switching to a known profile when you have an identifier, and emitting events with the properties your segments and campaigns expect.

  • Identity stitching: A user often starts anonymous (browsing) and becomes known at login, account creation, or checkout. Your upgrade needs to preserve the moment you call identify so anonymous events (like Product Viewed) attach to the right person once they’re known.
  • Event continuity: Your campaigns typically key off a small set of events: Add to Cart, Checkout Started, Order Completed, Subscribed, App Opened. If names/properties change during the upgrade, your cart recovery and post-purchase journeys will stop triggering or will trigger on partial data.
  • Device + channel readiness: For mobile retention, the SDK is also where device tokens and push permission state usually originate. If those don’t map cleanly post-upgrade, you’ll see “eligible audience” shrink even if traffic is flat.

Real D2C scenario: A shopper browses your new “hydration” collection on iOS, adds a bundle to cart, then abandons. Two days later they log in to check an old order. If your 4.x upgrade doesn’t merge anonymous browsing/cart events into the logged-in profile, your cart recovery flow won’t fire (or it’ll fire to the wrong profile), and your “viewed but not purchased” upsell segment won’t populate.

Step-by-Step Setup

Before you touch code, line up what “good” looks like: the exact events and properties your retention flows depend on today. Then upgrade and validate that the same person ends up with the same behavioral history in Customer.io after the switch.

  1. Inventory your retention-critical events and schemas.
    Pull a list of the events currently used in: cart abandonment, browse abandonment, post-purchase cross-sell, replenishment, and winback. For each event, document required properties (e.g., product_id, sku, price, currency, cart_id, order_id).
  2. Map identity touchpoints in the app.
    Write down where you call identity today: app launch, login, signup, checkout, and logout. The upgrade is successful when these moments still produce predictable merges (anonymous → known) without creating duplicates.
  3. Upgrade the SDK to 4.x in a feature branch.
    Follow the platform-specific install path (iOS/Android/React Native/etc.) and keep the change isolated so you can run side-by-side validation in QA.
  4. Re-implement (or confirm) your identify call.
    On login/signup/checkout completion, call identify with your stable customer identifier (typically your internal user ID) and set key attributes used in segmentation (email, phone, first_order_date, last_order_date, total_orders, etc.).
  5. Re-implement event tracking with the exact same contract.
    Emit the same event names and property keys your Customer.io segments and campaigns expect. If you want to rename anything, do it as a deliberate migration with dual-firing and a cutover date.
  6. Verify anonymous event capture and merge behavior.
    In QA, generate a known sequence: anonymous browse → add to cart → login → purchase. Confirm in Customer.io that all events appear on the final identified profile.
  7. Validate push/device data (if applicable).
    Confirm device tokens register, push permission status updates, and that the profile is reachable via mobile push segments you already use (e.g., “has push token” AND “active in last 30 days”).
  8. Release with monitoring.
    Ship behind a gradual rollout if you can. Watch event volume, identify calls, duplicate profiles, and key segment counts (cart abandoners, purchasers, active users) for drift.

When Should You Use This Feature

You don’t upgrade SDKs for fun. You do it when the tracking layer is holding back retention outcomes—either because you’re missing events, mis-stitching users, or you can’t trust the data powering your journeys.

  • Cart recovery is underperforming because the “cart” is anonymous.
    If a meaningful share of carts happen pre-login and don’t merge, you’ll never reach those shoppers with accurate cart contents.
  • Repeat purchase flows rely on app behavior.
    If you trigger replenishment or cross-sell based on Product Viewed or Category Browsed, you need clean event payloads post-upgrade or your segments hollow out.
  • Reactivation depends on true inactivity.
    Winback segments like “no app open in 45 days” break when app opens aren’t reliably tracked or are attributed to the wrong profile.
  • You’re seeing duplicate people records.
    Most duplicates come from inconsistent identifiers (email sometimes, user_id other times) or identify being called too late. Upgrading is a good forcing function to standardize.

Operational Considerations

Even with perfect code, retention programs fail when the data model doesn’t match how operators build segments and orchestrate journeys. Plan for a short window where old and new tracking may overlap, and decide how you’ll keep segmentation stable.

  • Segmentation stability: If you change event names/properties, every dependent segment and journey condition needs a coordinated update. The safest approach is dual-fire (old + new) for a defined period, then cut over.
  • Data flow timing: Cart and checkout events are time-sensitive. If identify happens after the cart event, you’re relying on merge behavior to stitch correctly. In practice, move identify earlier (at login) and keep cart events consistent across states.
  • Orchestration realities: Your journeys often use “trigger event” + “exit if purchase” logic. If purchase events arrive late or with a new schema, you’ll spam buyers with recovery messages. Validate end-to-end timing, not just that events exist.
  • Source of truth for customer attributes: Decide whether attributes like total_orders and last_order_date come from your backend (preferred) or the app. Apps are great for behavior; backend is better for order truth.

Implementation Checklist

Use this as the pre-launch gate. If you can’t check these off, you’re likely to ship a “successful upgrade” that quietly degrades retention performance.

  • Event taxonomy documented (names + required properties) for cart, checkout, purchase, browse, app open
  • identify uses a stable internal user ID (not email as primary key unless you truly never change it)
  • Anonymous → known merge verified with a QA script (browse → cart → login → purchase)
  • Purchase event includes order_id, value/revenue, currency, and line items if your flows use them
  • Segments counts compared pre/post upgrade (cart abandoners, purchasers, active users, push-eligible)
  • Journey triggers and exit criteria validated against the new payloads
  • Duplicate profile monitoring plan in place for the first 7–14 days

Expert Implementation Tips

The difference between “tracking works” and “tracking drives revenue” is usually a handful of operator decisions made during implementation.

  • Identify early, not at purchase. If you wait until order completion to identify, you lose the ability to reliably attribute pre-purchase intent events to the buyer profile—especially for cart recovery and browse retargeting.
  • Keep event names boring and stable. Operators build muscle memory around Add to Cart and Order Completed. If you rename to something “cleaner” during an SDK upgrade, you’ll create weeks of segment drift and broken triggers.
  • Version your schema changes explicitly. If you must change properties, add a property like schema_version: 2 and update segments to accept both versions during migration.
  • Test with real edge cases. Gift cards, discount codes, multi-currency, and partial refunds often break purchase payload assumptions. Those are the exact customers you don’t want to message incorrectly.

Common Mistakes to Avoid

These are the failure modes that show up as “why did revenue dip?” two weeks after a mobile release.

  • Calling identify with different identifiers across sessions. Mixing email sometimes and user_id other times creates duplicates and splits event history, which kills reactivation targeting.
  • Accidentally changing event property keys. A tiny change like productIdproduct_id can zero out a segment that powers browse abandonment.
  • Not validating merge behavior. Teams often confirm “events are arriving” but never confirm they land on the same profile after login.
  • Letting old and new events both trigger journeys. If you dual-fire without guardrails, you can double-enter users into cart recovery and over-message.
  • Assuming app-side order tracking is enough. If the app misses server-side order confirmation, you’ll send recovery messages to buyers. Prefer backend-confirmed purchase events for exits.

Summary

If your 4.x upgrade preserves identity stitching and keeps your event schema stable, your retention programs keep printing. If it doesn’t, you’ll feel it immediately in cart recovery eligibility, broken segments, and misfiring post-purchase flows.

Upgrade when you’re ready to validate the full loop: anonymous intent → identified buyer → correct suppression after purchase.

Implement 4.x Upgrade with Propel

If you’re upgrading under time pressure (app release train, new product drop, seasonal promos), the safest path is to treat the SDK work and the retention orchestration as one project. We’ll typically start by mapping the events your Customer.io journeys actually depend on, then QA identity stitching with a scripted set of D2C scenarios (browse → cart → login → purchase → refund).

If you want that validation layer before you roll out, book a strategy call and we’ll walk through your current 3.4x instrumentation, the 4.x cutover plan, and the monitoring you’ll need to protect revenue.

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