Implement the Customer.io SDK 2.x → 3.x Upgrade

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, treat the 2.x → 3.x move as a retention infrastructure project—not a “dev chore.” Your cart recovery, browse follow-ups, and winback flows only work as well as the identity stitching and event fidelity feeding Customer.io. If you want a second set of eyes on the tracking plan (and the gotchas that usually show up after release), book a strategy call.

In most D2C retention programs, the upgrade pays off when it eliminates duplicate profiles, fixes anonymous-to-known stitching, and standardizes event payloads so your segments stop drifting over time.

How It Works

At a practical level, the 3.x SDK upgrade is about getting three things right: initialization, identity, and events. If any of those are inconsistent across app sessions, your automations look “random” (people miss messages, or get them twice).

  • Installation + initialization: You update the SDK dependency and initialize the SDK with your workspace/site credentials. This is what starts collecting device/app context and enables event delivery.
  • Identity stitching (the retention-critical piece): You decide when a user is anonymous vs identified, and you consistently call identify at the moment you actually know who they are (login, account creation, email capture, checkout). This is what prevents “two people” from being created for one shopper.
  • Event tracking: You send behavioral events (e.g., Product Viewed, Added to Cart, Checkout Started, Order Completed) with stable naming and predictable properties. Customer.io then uses those events to power segments and trigger journeys.

D2C scenario: A shopper browses on mobile, adds a product to cart, then creates an account at checkout. If you don’t stitch anonymous activity to the identified profile during the upgrade, your cart abandonment journey triggers off the anonymous profile (no email/phone), while the identified profile never enters—your recovery rate drops and you’ll blame creative when it’s actually identity.

Step-by-Step Setup

Before engineering touches code, align on the retention outcomes you care about (cart recovery, post-purchase cross-sell, replenishment, winback). Then implement the SDK upgrade in a way that preserves identity and event continuity—otherwise you’ll spend the next month patching segments and exclusions.

  1. Inventory your current 2.x tracking.
    Export or document your current event names, key properties, and when you call identify/logout. Pay special attention to any “one-off” events used by automations.
  2. Define your identity contract.
    Choose the canonical identifier (usually customer_id or your internal user ID). Decide when you’ll set email/phone attributes, and when you’ll call identify (e.g., on login, account creation, email capture, or order completion).
  3. Upgrade the SDK dependency to 3.x.
    Update the package/dependency in your iOS/Android/React Native/Flutter project per your platform’s SDK instructions, then rebuild the app.
  4. Initialize the 3.x SDK on app start.
    Initialize once, early in the app lifecycle. Keep initialization consistent across app entry points (cold start, deep link, push open), because inconsistent init is a common cause of missing events.
  5. Implement identify at the right moment.
    Call identify immediately when you have a stable user ID. Attach core attributes you’ll segment on (email, phone, first_order_date, marketing_opt_in, etc.).
  6. Implement logout / identity reset correctly.
    When a user logs out, explicitly clear the identified state so you don’t attribute the next shopper’s browsing to the prior user (this happens more than teams want to admit on shared devices).
  7. Re-emit your retention events with stable naming.
    Keep event names identical to what your Customer.io segments and journeys expect—or plan a controlled migration (dual-send old + new for a short window) so you don’t break triggers.
  8. Validate in a staging workspace (or tightly scoped production test).
    Test: anonymous browse → add to cart → identify at checkout → purchase. Confirm the same profile shows the full event chain in Customer.io.
  9. Release with monitoring.
    For the first 48–72 hours, monitor duplicate profile creation, event volume deltas, and key journey entry counts (cart, post-purchase, winback).

When Should You Use This Feature

You don’t upgrade SDKs for fun—you do it when tracking gaps are actively costing you revenue or when your current integration is too brittle to support the next wave of retention automation.

  • Your cart recovery is underperforming on app. Common root cause: Added to Cart fires on anonymous profiles that never get stitched to an email/phone profile.
  • Your repeat purchase journeys are misfiring. If Order Completed is inconsistent (missing order_id, missing line items, duplicate sends), your replenishment and cross-sell logic becomes guesswork.
  • You’re seeing duplicate customers in Customer.io. Usually caused by inconsistent identifiers or calling identify with different IDs across sessions/devices.
  • You’re expanding channels (push/in-app) and need device accuracy. Better SDK hygiene tends to reduce “sent but never delivered” situations tied to stale device tokens or mismatched profiles.

Operational Considerations

The upgrade is “done” only when segmentation and orchestration behave predictably. Most issues show up downstream: segments drift, exclusions fail, and journeys start double-touching customers.

  • Segmentation stability: If you rename events or properties, your existing segments can silently drop to zero. Plan a migration window where you support both schemas or update segments and journeys in lockstep.
  • Data flow timing: App events often arrive out of order during bad connectivity. For cart recovery, build triggers that tolerate minor delays (e.g., wait windows) and rely on durable identifiers (cart_id, order_id).
  • Identity stitching rules: Decide whether email capture (newsletter modal) should identify a user or just set an attribute. In practice, misusing identify here can create over-merging or “wrong person” profiles if emails are mistyped.
  • Orchestration realities: If web and app both send commerce events, you need a dedupe strategy (shared order_id, source property, or a single system of record) or your post-purchase flows will send twice.

Implementation Checklist

If you run this as a checklist instead of a vague “upgrade,” you’ll avoid the usual retention-impacting regressions.

  • Current 2.x event taxonomy documented (names + required properties)
  • Canonical user identifier chosen and enforced across platforms
  • Clear rules for anonymous vs identified states
  • identify called at login/account creation/checkout (wherever ID becomes stable)
  • logout implemented to prevent cross-user contamination
  • Commerce events include durable IDs: product_id, variant_id, cart_id, order_id
  • Staging validation flow completed: browse → cart → identify → purchase
  • Journeys/segments updated (or dual-sent) to prevent trigger breakage
  • Post-release monitoring plan for duplicates, event volume, and journey entries

Expert Implementation Tips

These are the small operator moves that keep your retention machine stable while engineering ships the upgrade.

  • Version your event schema. Add an schema_version property during the migration. When something breaks, you can segment to “3.x only” and debug without guessing.
  • Use a single “source of truth” for purchase. If your backend already confirms orders, prefer server-side confirmation for Order Completed and keep the app event as supplemental (or clearly labeled with source: app).
  • Don’t identify on app install. If you identify too early with unstable IDs, you’ll inflate profiles and poison attribution. Anonymous first, identify when you actually know the shopper.
  • Build a stitching test script. Have QA run the same scenario on two devices with the same login and confirm events land on one profile—not two.

Common Mistakes to Avoid

Most “Customer.io is buggy” complaints after an SDK upgrade are self-inflicted. These are the patterns that typically break retention execution.

  • Changing event names without updating journeys. Cart flow triggers on Added to Cart, but the app now sends add_to_cart—entries quietly stop.
  • Calling identify with different identifiers over time. First session uses email, next session uses internal ID. You get duplicates and inconsistent suppression.
  • Forgetting logout/reset. Shared devices (tablets in retail, family phones) cause one person’s browsing to trigger another person’s winback.
  • Missing required properties. If Order Completed doesn’t include order_id, you can’t dedupe, and post-purchase journeys double-send.
  • No monitoring of journey entry deltas. If cart entries drop 30% after release, you want to know in hours—not after the monthly retention report.

Summary

Upgrade to 3.x when you need cleaner identity stitching and more reliable app-side events to power retention. Treat it like a tracking migration: lock the identity rules, keep event schemas stable, and validate the full shopper journey end-to-end. If cart recovery or post-purchase flows are core revenue levers, the QA plan matters as much as the code change.

Implement 3.x Upgrade with Propel

If you’re already running meaningful automations in Customer.io, the safest way to handle the 3.x upgrade is to map the tracking changes directly to the segments and journeys that make you money (cart recovery, repeat purchase, winback) and ship with a monitoring plan. When you want an operator-led implementation plan—identity rules, event schema, dedupe strategy, and validation flows—book a strategy call.

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