Summarize this documentation using AI
Overview
If you’re upgrading your app tracking from Customer.io Mobile SDK 4.x to 5.0.0, the real win isn’t “being on the latest version”—it’s protecting the identity + event stream that powers cart recovery, replenishment, and reactivation. When upgrades go sideways, it’s usually because anonymous sessions stop stitching to logged-in users, or key commerce events quietly change shape and segments stop qualifying.
This guide translates the 4.x → 5.0.0 upgrade into operator execution, so your Customer.io workspace keeps receiving clean, joinable data. If you want a second set of eyes on the tracking plan (especially identity stitching + event taxonomy), book a strategy call and we’ll pressure-test it like we would for a live retention program.
How It Works
In practice, the SDK upgrade matters because your app is the source of truth for “who is this person” and “what did they do”—and Customer.io automations only behave as well as that stream. The 5.x SDK continues the same core pattern: initialize the SDK, capture anonymous activity, then identify the user when you know who they are, and track events with consistent names/properties so segments and campaigns don’t drift.
- Installation + init: your app loads the 5.0.0 SDK and initializes it early (app start). This is where environment config (site ID / API key / region) and channel modules (push/in-app) typically get wired.
- Anonymous activity: users can browse, view products, and add to cart before login. The SDK should still record those events against an anonymous profile/device.
- Identify call (stitch point): once the user authenticates (login, account creation, or even email capture), you call
identifywith a stable identifier (usually your internal user_id, sometimes email). This merges anonymous activity into the known profile so abandoned cart and browse retargeting can actually fire. - Event tracking: you send events like
Product Viewed,Added to Cart,Checkout Started,Order Completedwith properties (SKU, price, category, cart_id, order_id). Journeys/segments depend on these names and fields staying consistent across the upgrade. - Attribute updates: you update person attributes (LTV, last_order_date, subscription_status, preferred_category) either via SDK or server-side—what matters is that the identifier matches so Customer.io doesn’t create duplicates.
Real D2C scenario: a shopper adds a moisturizer to cart while anonymous, then logs in at checkout. If the 5.x upgrade breaks identity stitching, the Added to Cart event stays on the anonymous profile and your cart recovery flow never triggers for the known user—so you’ll see “cart abandonment down” in Customer.io, but revenue down in Shopify. The fix is almost always: initialize early, track before login, then identify immediately on auth success (and don’t change identifiers midstream).
Step-by-Step Setup
SDK upgrades are rarely hard—they’re just easy to do in a way that silently corrupts your retention data. The steps below keep your event taxonomy stable and your identity graph clean while you move from 4.x to 5.0.0.
- Inventory your current 4.x tracking contract
Pull a list of: (a) identify fields you send, (b) person attributes you rely on for segmentation, (c) event names + required properties. This becomes your “don’t break retention” baseline. - Upgrade the SDK dependency to 5.0.0
Update your iOS/Android/React Native/Flutter dependency to the 5.x line per your platform. Keep the change isolated in a single PR so you can diff initialization + tracking behavior cleanly. - Re-implement initialization exactly once, as early as possible
Initialize at app start (not on first screen render, and not only after login). In most retention programs, late init is the #1 reason “Product Viewed” volume drops after an SDK change. - Confirm anonymous event capture still works
Before you identify anyone, trigger a browse flow: open app → view product → add to cart. Verify those events arrive in Customer.io and appear under an anonymous profile/device. - Re-validate your identify call and identifier choice
Identify immediately after authentication succeeds. Use a stable identifier (internal user_id is best). If you use email, ensure it’s normalized (lowercase, trimmed) and doesn’t change format between app and server. - Test anonymous-to-known stitching
Repeat the same flow: browse + add to cart while anonymous → login → confirm the earlier events now appear on the known profile. If they don’t, your cart recovery and browse retargeting will underperform. - Verify event schema parity (names + properties)
Compare 4.x vs 5.x payloads for your key events. Even a small property rename (e.g.,sku→product_sku) can break segments and dynamic message content. - Run a shadow QA campaign
Create a temporary segment (internal testers only) and a test workflow triggered byAdded to Cartto confirm timing, qualification, and personalization still work end-to-end. - Roll out gradually
Release to a small % of users first. Watch event volumes and identify rates before full rollout.
When Should You Use This Feature
You don’t upgrade an SDK because it’s a checkbox—you do it because your retention program depends on accurate identity + events, and the app is where the most valuable behavior happens. If you’re running push, in-app, or app-driven cart recovery, you want the latest stable tracking layer and a clean stitch between anonymous and known users.
- Cart recovery that starts in-app: if a meaningful share of carts are built in-app, SDK accuracy directly drives recovery volume and personalization (items, price, urgency).
- Repeat purchase + replenishment: when you trigger “time-to-reorder” or “use it up” flows based on app engagement (product views, category affinity), you need consistent event properties across versions.
- Reactivation based on app inactivity: if you’re segmenting on last app open / last viewed category, SDK changes can shift timestamps and drop people out of winback audiences.
- Identity stitching for guest checkout / email capture: if users browse anonymously and only identify late, the upgrade is the moment to harden your stitch strategy so you don’t lose pre-login intent.
Operational Considerations
The upgrade is a technical change, but the fallout is operational: segments stop matching, flows lose entrants, and revenue attribution gets noisy. Treat this like a data pipeline migration, not an app dependency bump.
- Segmentation dependencies: list every segment used in revenue-driving flows (abandon cart, post-purchase cross-sell, winback). Map each segment condition back to an event/property/attribute. Those are your “must not change” fields.
- Data flow ownership: decide what’s app-side vs server-side. In practice, orders are often more reliable server-side (to avoid offline/latency issues), while browse/cart intent is best app-side. Just don’t double-send the same “Order Completed” event from both.
- Identity stitching realities: duplicates usually happen when teams identify with email in one place and user_id in another. Pick one primary identifier strategy and stick to it across SDK + backend.
- Orchestration timing: if you trigger a cart flow on
Checkout Startedbut the identify call happens after, the user may enter as anonymous and never receive the message. Make identify happen before high-value triggers whenever possible. - Release monitoring: watch ratios, not just counts—e.g.,
identifycalls per app session,Added to Cartper product view, and known-user share of cart events.
Implementation Checklist
If you want this upgrade to be boring (in a good way), use this checklist to make sure retention-critical tracking stays intact through release.
- 4.x baseline documented: identify fields, key events, required properties
- 5.0.0 SDK installed and initialized at app start
- Anonymous browsing events confirmed in Customer.io
identifycalled immediately on auth success- Anonymous-to-known stitching validated with a real browse → login flow
- Event names and property keys match the existing taxonomy
- No double-sending of purchase/order events across app + server
- Test segment + QA workflow confirms triggers and personalization
- Staged rollout with monitoring of event volume + identify rate
Expert Implementation Tips
Most teams “upgrade” and then spend two weeks wondering why flows got quieter. These are the operator moves that keep revenue stable while you change the plumbing.
- Protect your event contract with automated tests: even a lightweight QA script that logs event payloads during a standard user journey will catch property drift before it hits production.
- Use a single source of truth for IDs: if your backend uses
customer_id, don’t let the app senduserIdsometimes and email other times. Identity stitching is only as good as identifier consistency. - Track cart with a stable cart identifier: include
cart_idon cart events so you can dedupe and build cleaner logic in Customer.io (e.g., “send once per cart”). - Don’t rely on app purchase events for revenue reporting: keep “Order Completed” server-side when possible; use app-side events for intent and for UX milestones.
- Watch known-vs-anonymous mix after rollout: if known users drop, your identify call timing or init timing is off—even if total event volume looks fine.
Common Mistakes to Avoid
The upgrade failures that hurt retention are usually subtle. They don’t throw errors—they just change who qualifies for your flows.
- Initializing after login: you’ll lose pre-login intent (views, add-to-cart) and your cart/browse retargeting will quietly underperform.
- Changing event names “to be cleaner” during the upgrade: that breaks segments, message liquid, and historical comparisons. If you want to rename, do it as a separate migration with parallel tracking.
- Switching identifiers midstream: identifying with email in 4.x and user_id in 5.x commonly creates duplicates and splits LTV across profiles.
- Forgetting required properties: cart recovery messages often depend on line items. If the 5.x implementation drops
itemsor changes its structure, your dynamic cart content fails. - Double-sending purchases: app + server both firing
Order Completedinflates revenue events, breaks post-purchase suppression, and spams customers.
Summary
Upgrade to 5.0.0 when you’re ready to treat app tracking like retention infrastructure: initialize early, keep your identifiers stable, and preserve the event/property contract your segments depend on.
If you can validate anonymous-to-known stitching and event schema parity before rollout, you’ll avoid the most common revenue-impacting regressions.
Implement 5.x Upgrade with Propel
If you’re already running meaningful cart recovery, replenishment, or winback in Customer.io, the safest way to upgrade is to start from the retention requirements (segments, triggers, personalization) and work backwards into the SDK implementation. That’s usually where teams catch the “small” identity and schema issues that become big performance drops.
We can review your 4.x baseline, map it to a 5.x tracking contract, and give you a QA plan that confirms stitching and trigger integrity inside Customer.io. If that would help, book a strategy call and we’ll walk through your app flows (anonymous browse → login → purchase) and the exact events your retention automations rely on.