Summarize this documentation using AI
Overview
If you’re upgrading your app-side tracking from 1.x to 2.x in Customer.io, the goal isn’t “get the SDK compiling.” The goal is to preserve identity, keep event names stable, and avoid breaking the segments that power cart recovery and repeat purchase automations. If you want a second set of eyes on the tracking plan before you ship, book a strategy call and we’ll pressure-test the upgrade against your highest-revenue workflows.
In practice, most 1.x → 2.x upgrades go sideways for one reason: identity stitching changes (anonymous → known) aren’t treated as a retention-critical dependency. You end up with “ghost carts,” duplicate profiles, and under-attributed revenue in your recovery flows.
How It Works
The 2.x SDKs are built around cleaner identity management and more consistent event delivery patterns across platforms (iOS/Android/React Native, etc.). Operationally, that means you should treat the upgrade like a data migration: keep your tracking contract stable (event names + properties), then validate that the same user journey still resolves to one person in Customer.io.
- Installation changes: you’ll update the SDK package/version and initialize the SDK using the 2.x pattern for your platform. The exact code differs by platform, but the operational requirement is the same: initialize early enough in the app lifecycle to capture pre-login behavior (product views, add-to-cart) without delaying app start.
- Identify vs anonymous tracking: in 1.x implementations, teams often “identify late” (only after checkout/login). In 2.x, you want a deliberate plan:
- Track pre-login activity against an anonymous profile/device.
- Call
identifyimmediately when you have a stable identifier (login, account created, email captured). - Ensure the SDK merges anonymous activity into the known profile so cart and browse events don’t get stranded.
- Event tracking parity: your retention automations depend on consistent event names and properties. The upgrade is the time to lock a schema:
Product Viewed,Added to Cart,Checkout Started,Order Completed, with consistent fields likeproduct_id,variant_id,price,currency,quantity,cart_id. - Device/channel linkage: if you use push, the SDK upgrade affects device registration. If device tokens don’t land correctly, your “push-first cart recovery” segment silently shrinks. Treat push token capture as part of the upgrade validation, not a separate task.
Real D2C scenario: a shopper adds a bundle to cart on mobile, gets distracted, then logs in later. If your 2.x upgrade doesn’t correctly merge anonymous activity, the cart abandonment journey won’t fire because the Added to Cart event lives on an anonymous profile while the login created a new known profile. Revenue impact shows up immediately as fewer recoveries, not as an obvious error.
Step-by-Step Setup
Before you touch code, decide what “success” means: same user = same profile, same events = same segments, same flows = same conversion rate. Then you implement the SDK upgrade and validate with real journeys (browse → cart → login → purchase).
- Inventory your current tracking contract.
Export or document your current 1.x event names, required properties, and which campaigns/segments rely on them (cart recovery, post-purchase upsell, replenishment, winback). - Pick your identity strategy (and write it down).
Define when you callidentify(login, sign-up, email capture) and what identifier you use (internal customer ID preferred; email as fallback). Decide how you will handle logout (do you reset to anonymous or keep the last known user on a shared device?). - Upgrade the SDK to 2.x in your app.
Update dependencies (iOS/Android package manager, React Native/Flutter wrapper, etc.), then update initialization to the 2.x pattern. Make sure initialization happens early enough to catch pre-auth events. - Re-implement
identifyand verify merge behavior.
Trigger a pre-login event (e.g.,Product Viewed), then log in and confirm that the pre-login event appears on the same person profile after identify. If you see two profiles, stop and fix identity before shipping. - Re-implement event tracking with strict parity.
Keep names and core properties identical unless you’re intentionally versioning. If you must change names, plan a transition window where you send both old and new events so segments don’t break overnight. - Validate push token/device registration (if applicable).
Confirm devices attach to the correct person after login and that push sends are deliverable to a test device. This is where upgrades often “work” but retention performance drops. - Run a shadow QA against your highest-value flows.
In a staging workspace or with internal test users, run: browse → add to cart → abandon → open app → checkout → purchase. Confirm each step triggers the same Customer.io events and enters the expected segments.
When Should You Use This Feature
You upgrade to 2.x when tracking reliability is limiting retention performance, not because it’s “time.” The best signal is when your automations are correct in theory but inconsistent in execution because identity and event delivery are messy.
- Cart recovery is underperforming on app because add-to-cart events are missing, delayed, or tied to anonymous profiles that never merge.
- Repeat purchase flows misfire because purchases are recorded on one profile while browse behavior lives on another (common when users check out as guest, then create an account later).
- Reactivation segments are noisy because “inactive” users are actually active on a different device/profile created by inconsistent identify calls.
- You’re expanding push/in-app as a core channel and need device registration + identity stitching to be dependable.
Operational Considerations
The upgrade is a data pipeline change, so treat it like one. Your segmentation and orchestration only work if the underlying identity graph is stable and events arrive with predictable structure.
- Segmentation dependencies: list every segment that references app events (e.g., “Added to Cart in last 4 hours AND no Order Completed”). If event names/properties change, those segments quietly stop matching.
- Data flow timing: mobile events can arrive late (offline, background restrictions). Build cart recovery with a buffer (e.g., wait 30–60 minutes) and use “has not purchased since event” checks rather than assuming perfect ordering.
- Identity stitching realities: decide your source of truth identifier. In most retention programs, using an internal customer ID for
identifyreduces duplicates versus email-only, especially when users change emails or use Apple Private Relay. - Cross-device behavior: if a user browses on mobile then buys on web, your app SDK upgrade won’t fix cross-channel attribution unless your web tracking also identifies with the same ID. Plan for consistency across surfaces.
- Versioning strategy: if you’re going to evolve the schema, version events intentionally (e.g.,
Added to Cart v2) and keep both live until all segments and journeys are migrated.
Implementation Checklist
Use this as a go/no-go list before you ship the 2.x upgrade to production. If any of these fail, you’re likely to see immediate drops in recovery and repeat purchase performance.
- SDK 2.x initializes early in the app lifecycle (captures pre-login events).
identifyfires consistently on login/account creation (not just on purchase).- Anonymous pre-login events merge into the known profile after
identify. - Event names match existing production schema (or dual-sent during migration).
- Core commerce properties are present:
product_id,variant_id,price,currency,quantity,cart_id,order_id. - Push token/device registration attaches to the correct person after login (if using push).
- Key segments still populate at expected volumes after release (cart abandoners, purchasers, inactive users).
- At least one end-to-end test journey matches expected campaign entry/exit behavior.
Expert Implementation Tips
The difference between a “successful upgrade” and a revenue-positive upgrade is whether you protect downstream workflows. These are the patterns that keep retention stable while you change the plumbing.
- Instrument a dedicated QA user set. Create internal test accounts and run the same scripted journeys every release. It’s the fastest way to catch identity regressions before they hit revenue.
- Send both old and new events during a transition. If you’re forced to rename events/properties, dual-send for 2–4 weeks and migrate segments first. Don’t flip everything in one deploy.
- Use cart_id aggressively. For cart recovery,
cart_idis what prevents “added-to-cart” spam when users modify carts repeatedly. It also makes it easier to suppress messages once an order happens. - Normalize currency/price types. Mixed formats (string vs number, cents vs dollars) break conditional logic in workflows and make revenue reporting unreliable.
- Plan logout behavior. Shared devices and logout flows create duplicate/incorrect attribution if you don’t explicitly reset identity or manage anonymous state carefully.
Common Mistakes to Avoid
These are the mistakes that look harmless in a sprint but show up as sudden drops in cart recovery, broken segments, or inflated audience sizes.
- Changing event names “to be cleaner” during the upgrade. That’s how you silently break every downstream segment and journey.
- Calling
identifywith unstable identifiers. Emails can change; phone numbers can be missing; Apple Private Relay can rotate. Prefer an internal customer ID when you have it. - Identifying too late. If you only identify at purchase, you lose the ability to tie browse/cart behavior to the person you actually want to message.
- Not verifying anonymous merge behavior. This is the #1 cause of “why didn’t the abandonment flow trigger?” after an SDK change.
- Ignoring device registration. Push performance drops aren’t always deliverability—they’re often identity/device linkage regressions after an SDK upgrade.
- No post-release monitoring. You need segment volume checks (daily) for at least a week after release to catch edge cases.
Summary
Upgrade to 2.x when you’re ready to treat app tracking like retention infrastructure: stable identity, stable schema, predictable delivery. If you validate anonymous-to-known stitching and protect event parity, your cart recovery and repeat purchase programs keep running while you modernize the SDK.
Implement 2.x Upgrade with Propel
If you’re running meaningful revenue through app-driven journeys in Customer.io, the safest way to approach a 2.x upgrade is to start from the workflows you can’t afford to break (cart recovery, post-purchase upsell, winback) and work backwards into the tracking contract. That’s usually where teams discover they need a clearer identity plan or a short dual-send migration window.
If you want help mapping the upgrade to your actual segments and orchestration, book a strategy call. We’ll review your current 1.x events, define the 2.x identity rules, and outline a rollout plan that protects revenue while you ship.