Summarize this documentation using AI
Overview
If you’re moving from SDK 2.x to 3.x, treat it like a retention infrastructure change—not a “dev upgrade.” Your tracking surface (identify, device registration, and purchase/cart events) is what determines whether Customer.io can reliably power cart recovery, repeat purchase, and reactivation. If you want a second set of eyes on the migration plan before you ship it, book a strategy call—most teams underestimate how easy it is to break identity stitching during this step.
In most retention programs, we’ve seen SDK upgrades create silent data drift: events still “fire,” but they no longer attach to the right person, or they lose key properties that segments and workflow branches depend on.
How It Works
SDK 3.x changes how your app sends identity and behavioral data into Customer.io. Practically, the migration comes down to three things: initializing the SDK cleanly, identifying users at the right moment, and emitting events with consistent naming/properties so your existing segments and campaigns don’t lose signal.
- Initialization: Your app boots the Customer.io SDK early in the app lifecycle. This is where you set workspace credentials and any channel-specific config (push token collection, deep link handling, etc.). If initialization happens too late, you’ll miss early-session events (classic culprit: product-view and browse events that drive back-in-stock or discovery flows).
- Identity stitching: Anonymous sessions and logged-in sessions need to merge into a single profile. In practice, this hinges on calling
identifyimmediately after you have a durable user identifier (account created, login completed, or email captured). If you delay identification until after checkout, your cart recovery and browse retargeting will underperform because pre-login events stay stranded on anonymous profiles. - Event tracking: SDK events should mirror the decision points in your retention system:
Viewed Product,Added To Cart,Started Checkout,Purchased, etc. The SDK sends these events with properties; Customer.io uses those properties for segmentation and orchestration (branching, filters, frequency rules, and goal tracking).
Real D2C scenario: A shopper browses on mobile, adds a product to cart, then creates an account at checkout. If your 3.x migration doesn’t merge anonymous activity into the identified profile, your cart abandonment journey won’t see the cart event on the same person who has an email/push token—so the recovery message never sends, or it sends to the wrong profile.
Step-by-Step Setup
The cleanest migrations are the ones where you lock down your tracking contract first (IDs, event names, required properties), then implement SDK 3.x, then validate in Customer.io with real devices—not just unit tests.
- Inventory your current 2.x tracking contract.
Export or document: the user identifier you pass to Customer.io, the attributes you set on identify, and the exact event names/properties your retention flows depend on (cart, checkout, purchase, product view). - Define your 3.x identity rules before coding.
Decide what your canonical identifier is (e.g., internal customer ID) and when it becomes available. Also decide how you’ll handle email capture before account creation (common in D2C): if email is captured pre-login, you’ll want a plan to stitch that to the eventual customer ID. - Install and initialize the 3.x SDK.
Implement SDK 3.x initialization as early as possible in app startup. Keep config centralized so you don’t end up with environment drift (staging vs prod keys, push settings, etc.). - Implement
identifyimmediately after login/account creation.
Callidentifythe moment you have the durable ID. Set the attributes your segments rely on (email/phone if you use them, acquisition source if you branch on it, and any loyalty/subscription flags). - Re-implement your core retention events with strict parity.
Make sure 3.x emits the same event names and required properties your campaigns reference. If you want to rename events, do it as a deliberate versioned change (run both names temporarily, then migrate workflows). - Verify device/channel registration.
Confirm push tokens (and any in-app identifiers, if used) attach to the same profile that receives email/SMS. This is where cart recovery and post-purchase flows often break—messages “send,” but to a profile without a reachable device token. - Validate end-to-end in Customer.io with live test orders.
Run a full funnel on a real device: browse → add to cart → login → checkout → purchase. Then confirm in the person profile that events are present, ordered correctly, and attached to the identified user (not split across duplicates).
When Should You Use This Feature
Upgrading to 3.x is worth prioritizing when your retention performance depends on mobile accuracy—especially if you’re using push/in-app and you need clean stitching between anonymous browsing and logged-in purchase behavior.
- Your cart recovery is underfiring on mobile. If you see lots of app adds-to-cart but low message sends, it’s often identity fragmentation or missing event properties—migration is a good forcing function to fix it.
- You’re building repeat-purchase timing off real purchase events. Post-purchase replenishment, cross-sell, and winback flows live or die on accurate
Purchasedevents with SKU/category/order-value properties. - You’re trying to reactivate lapsed app buyers. Reactivation segments typically need “last purchase date” plus “last app activity.” SDK accuracy is what makes those segments trustworthy.
- You want consistent multi-channel orchestration. If email is driven by backend events but push is driven by app events, you’ll get mismatched timing and duplicated sends unless identity and event semantics line up.
Operational Considerations
The migration isn’t just “does the SDK compile.” It’s whether your data continues to support segmentation and orchestration the way your retention program expects.
- Segmentation stability: Audit segments that depend on mobile events (e.g., “Added To Cart in last 4 hours AND not Purchased”). If an event name or property changes, the segment silently empties and your journey stops enrolling people.
- Data flow timing: Mobile events can arrive out of order (offline mode, backgrounding). For cart recovery, that means you should design journeys to tolerate late-arriving purchase events (use goals/exit conditions and short delays rather than immediate sends).
- Duplicate people risk: In practice, this tends to break when teams identify by email in one place and by customer ID somewhere else. Pick one canonical ID, and treat all other identifiers as attributes—otherwise you’ll split purchase history across profiles and your LTV-based segments become unreliable.
- Orchestration realities: If your backend also sends purchase events, decide who is source-of-truth. Double-sending purchases (app + server) inflates revenue metrics and can prematurely exit people from journeys.
Implementation Checklist
Before you ship the 3.x upgrade, you want a short checklist that confirms the retention-critical parts are correct—not just that events appear somewhere.
- SDK 3.x initializes on app launch (not after the first screen renders)
identifyfires immediately after login/account creation with canonical user ID- Required attributes for messaging (email/phone/push token) attach to the same profile
- Core events match expected names exactly (Viewed Product, Added To Cart, Started Checkout, Purchased)
- Event properties required for segmentation are present (SKU, category, price, quantity, order_id, cart_value)
- No double-sending of purchase events (define app vs server source-of-truth)
- Test funnel validated on a real device and confirmed in Customer.io person activity
- Key journeys/segments re-checked for enrollment volume after release
Expert Implementation Tips
The difference between “migration done” and “retention improved” usually comes down to discipline around identity and event schemas.
- Version your event schema intentionally. If you must change event names/properties, run old + new in parallel for a week, migrate segments/journeys, then remove the old. This avoids sudden enrollment drops.
- Track a single cart event that’s actually usable. Don’t just send
Added To Cart—includecart_id,items(array),cart_value, andcurrency. Your recovery creative and branching logic will be dramatically better. - Force identity merge testing. Create a test plan where you add to cart anonymously, then log in, then purchase. If you see two profiles in Customer.io, fix it before you roll out.
- Guard against offline/backfill noise. If the app queues events offline, you can get “Added To Cart” delivered after “Purchased.” Use journey delays and purchase goals to prevent awkward post-purchase cart nags.
Common Mistakes to Avoid
Most issues don’t show up as errors—they show up as quieter journeys, lower recovery rates, and weird attribution. These are the patterns to watch for.
- Calling
identifytoo late. If you identify only at purchase, you lose the entire pre-purchase behavioral trail for targeting and personalization. - Changing event names without migrating workflows. Your cart journey might be listening for
Added to Cartwhile the app now sendsadd_to_cart. Everything “works,” nothing sends. - Using multiple identifiers as the primary ID. Email in one place, customer_id in another creates duplicates and breaks LTV segmentation.
- Double-counting purchases. App sends
Purchased, backend sendsOrder Completed, both trigger post-purchase flows and inflate revenue reporting. - Not validating on real devices. Simulator tests don’t catch push token attachment issues or background delivery timing.
Summary
SDK 2.x → 3.x is mainly an identity and event-schema migration. If you keep your canonical ID consistent and preserve event parity, your retention journeys keep running—and usually get more reliable.
If you’re seeing underfiring cart recovery, messy duplicates, or inconsistent mobile vs backend purchase tracking, the upgrade is a good moment to fix the foundation.
Implement Update To 3x with Propel
If you want the upgrade to translate into measurable retention lift (not just “SDK updated”), treat it as a tracking contract project: identity rules, event schema, and journey validation. That’s the work that makes Customer.io segmentation and orchestration behave predictably.
When it’s helpful, we’ll sanity-check your identify strategy, map events to the journeys that drive revenue (cart recovery, replenishment, winback), and help you validate the release with real-device testing—book a strategy call.