Summarize this documentation using AI
Overview
If you’re moving from Customer.io SDK 3.4x to 4.x, treat it like a data migration—not an app dependency bump. Your retention program lives and dies on identity stitching (anonymous → known) and event accuracy, and an SDK upgrade is one of the easiest ways to quietly break both. This guide translates the upgrade into an operator-ready plan you can run with engineering and QA, while keeping automations stable in Customer.io. If you want a second set of eyes before you ship, book a strategy call and we’ll sanity-check your tracking plan against your highest-revenue flows.
In most D2C apps, the first thing that goes wrong during an SDK upgrade is attribution: “Added to Cart” stops attaching to the right profile, cart recovery journeys under-trigger, and your winback segments drift. The goal here is simple: upgrade to 4.x while keeping person identity, device mapping, and event payloads consistent enough that campaigns don’t need a rewrite.
How It Works
The 3.4x → 4.x jump usually changes how your app initializes the SDK, how you identify users, and how you send events. Operationally, that means you need to re-confirm three things: (1) the SDK boots early enough to capture pre-login behavior, (2) anonymous activity merges into the right known profile after login/signup, and (3) event schemas stay stable so segments and campaigns keep matching.
- Installation + initialization: 4.x typically expects a cleaner init path (often with explicit configuration). If init moves later in the app lifecycle, you’ll lose early funnel events (product views, add-to-cart) and your abandonment triggers will undercount.
- Identity stitching: Your app will generally create anonymous activity first (device-based), then call
identifyafter login/signup. The upgrade is where teams accidentally change the identifier they pass (email vs customer_id) or call identify too late—both cause duplicate profiles and broken suppression/eligibility logic. - Event tracking: You’ll keep sending events (e.g.,
Product Viewed,Added to Cart,Checkout Started,Order Completed) with properties. The risk is subtle: renaming events, changing property keys, or changing data types (string → number) will silently break segments and message personalization.
Real scenario: A skincare brand’s app tracks Added to Cart anonymously, then identifies on login. After upgrading, identify moved to a later screen, so cart events stayed anonymous and never merged. Result: cart recovery push/email volume dropped ~25% overnight, while “new users” inflated because the same people existed twice. The fix wasn’t in Customer.io—it was moving initialization earlier and calling identify immediately after auth, then verifying merge behavior in the Activity Log.
Step-by-Step Setup
Run the upgrade like a controlled rollout. You’re not just validating “events fire”—you’re validating that the same person receives the right message at the right time, with the right product context.
- Inventory your current tracking contract (before touching code).
Export or document your current event names and required properties for retention flows: cart recovery, browse abandon, post-purchase cross-sell, replenishment, winback. Include the identifier you use foridentify(and whether you also set email/phone attributes). - Map 3.4x SDK calls to 4.x equivalents.
In practice, the biggest migration work is around initialization, identify, and device registration. Decide where SDK init lives (App start), where anonymous events fire (immediately), and where identify happens (immediately after auth success). - Implement 4.x installation + initialization.
Add the 4.x SDK to your iOS/Android (or React Native/Flutter) project and initialize it as early as possible. Ensure you’re not gating initialization behind consent screens unless your privacy policy requires it—if you do, you need a plan for “pre-consent” vs “post-consent” tracking consistency. - Re-implement
identifyand attribute setting.
Callidentifyright after login/signup, using your canonical ID (typically a stablecustomer_id). Then set core attributes (email, phone, first_name, subscription status) in the same session so campaigns don’t wait for a later sync. - Verify anonymous → known merge behavior.
QA a full flow on a fresh install: view product → add to cart → login → confirm the pre-login events appear on the identified profile in Customer.io. If they don’t merge, cart recovery will miss. - Validate event schema parity.
Fire your key events and confirm: event name matches exactly, required properties exist, and property types are unchanged. Pay special attention to product identifiers (SKU vs product_id), price formatting, and arrays (line_items) because those drive personalization. - Run side-by-side QA against live campaigns (safely).
Use an internal test segment and a “QA journey” that mirrors production logic (cart abandon wait → message). Confirm entry, timing, and exit behavior before rolling to 100%. - Roll out gradually and monitor.
Ship behind a feature flag if possible. Watch: event volume for cart/browse events, profile creation rate, duplicate profiles, and conversion rate from recovery journeys. You’re looking for step-function drops, not normal variance.
When Should You Use This Feature
The SDK upgrade is worth prioritizing when your retention program depends on app-side behavior and you need higher fidelity than web pixels can give. If your revenue is meaningfully driven by push, in-app, or app-first shopping behavior, the 4.x upgrade is usually a prerequisite for cleaner tracking and better orchestration.
- Cart recovery in an app-first funnel: When add-to-cart and checkout-start happen in-app and you need push/in-app recovery to trigger reliably.
- Browse abandonment / product discovery: When “Product Viewed” and category browsing drive recommendations and you want to suppress messages once someone returns.
- Repeat purchase + replenishment: When post-purchase events (order completed, subscription started, replenishment reminder) must map to the same person across sessions and devices.
- Reactivation for lapsed app users: When you segment on “last app open” + “no purchase in X days,” and you need accurate device association for push delivery.
Operational Considerations
The upgrade is “done” only when your segments, triggers, and suppression logic behave the same way they did before. Most retention programs break here because the data still arrives—just not in a way that matches your existing orchestration.
- Segmentation stability: Audit every segment that references SDK events or attributes. If you change event names or property keys, you’ll strand people outside of journeys (or worse, include the wrong people).
- Identity strategy: Pick one canonical identifier for
identify(usually internal customer_id). Keep email/phone as attributes, not the primary key, unless you’re 100% sure they’re stable and unique. - Anonymous tracking rules: Decide what you track pre-login (product view, add-to-cart) and ensure it merges post-login. If you can’t merge reliably, your abandonment programs will underperform and you’ll over-message because suppression won’t work.
- Data flow timing: If your cart recovery waits 30–60 minutes, but your events arrive late (due to batching, background restrictions, or init timing), you’ll send messages with stale or missing cart contents.
- Orchestration across channels: Push delivery depends on device tokens; email depends on profile attributes; in-app depends on SDK state. Validate that the same person remains eligible across channels after the upgrade.
Implementation Checklist
Use this to keep the upgrade retention-safe. The point is to prevent “it shipped” from turning into “why did recovery revenue drop?” a week later.
- Document current
identifyID strategy (customer_id vs email) and keep it consistent in 4.x - Initialize the SDK at app start (not after login) to capture pre-auth events
- Call
identifyimmediately after auth success (login/signup) - Confirm anonymous events merge into the identified profile in Customer.io
- Validate event name parity for retention-critical events (Product Viewed, Added to Cart, Checkout Started, Order Completed)
- Validate required properties and data types (sku/product_id, price, currency, quantity, line_items)
- Verify device registration for push (token updates, permission changes, reinstall behavior)
- Create an internal QA segment and a mirrored “QA recovery journey” to test triggers/exits
- Roll out with monitoring: event volume, profile duplication, journey entry counts, recovery conversion
Expert Implementation Tips
These are the small operator moves that prevent big revenue surprises.
- Keep your event contract boring. If you want to rename events or improve schemas, do it as a separate project. Combine “SDK upgrade” + “tracking redesign” and you’ll never know what caused the drop.
- Send a single “source of truth” order event. For repeat purchase and suppression, make sure
Order Completedcomes from the system that’s most reliable (often backend). Use the SDK for behavioral intent; use backend for financial truth. - QA identity with a forced edge case. Test: add to cart anonymously, close app, reopen, log in, then purchase. If your merge fails across sessions, you’ll see it immediately.
- Watch duplicate profiles like a hawk. In practice, duplication shows up as: higher “new profiles created,” lower journey entry, and more complaints about irrelevant reminders. Fixing it later is painful because historical events split across profiles.
- Build a “tracking heartbeat” dashboard. Track daily counts for 5–10 key events. You don’t need fancy BI—just enough to catch a 20% drop within 24 hours.
Common Mistakes to Avoid
Most teams don’t fail because they forgot to send events—they fail because the events no longer match how Customer.io is orchestrating retention.
- Changing the identifier passed to
identify. Switching from email → customer_id (or vice versa) without a migration plan will create duplicates and break suppression. - Initializing the SDK too late. If init happens after login, you lose anonymous browsing/cart intent—your highest leverage recovery triggers.
- Silent schema drift. Renaming
product_idtoid, changingpricefrom number to string, or removingcurrencywill break segments and liquid templates. - Assuming push “just works” after upgrade. Token registration and permission states change across OS versions. Validate token refresh, reinstall behavior, and opt-in/out transitions.
- No rollback plan. If you can’t quickly revert or feature-flag the new SDK, you’ll be stuck while revenue bleeds from broken recovery.
Summary
Upgrade to 4.x when you’re ready to treat app tracking as infrastructure for retention, not a one-off integration. Keep identity consistent, keep schemas stable, and QA merge behavior like it’s a revenue-critical feature—because it is. If cart recovery and repeat purchase flows stay healthy through rollout, you did it right.
Implement 4.x Upgrade with Propel
If you’re coordinating this upgrade across engineering, analytics, and retention, the fastest path is usually a tight tracking contract + a QA journey that mirrors your real money flows. We’ll pressure-test your identity stitching and event schemas against what your campaigns actually depend on in Customer.io, then help you validate rollout so you don’t discover issues after revenue drops. If that would help, book a strategy call and bring your current event list and your top 2–3 automations (cart, post-purchase, winback).