Summarize this documentation using AI
Overview
If you’re upgrading your app tracking from SDK 2.x to 3.x, treat it like a retention infrastructure change—not a “dev chore.” Your cart recovery, browse abandon, and post-purchase flows only work as well as the identity stitching and event payloads you feed into Customer.io. If you want a second set of eyes before you ship (because in practice, this tends to break at the worst possible time), book a strategy call and we’ll pressure-test the tracking plan against your actual retention programs.
Most D2C teams upgrade and then wonder why “Added to Cart” volume drops, anonymous browse events stop merging, or purchasers suddenly look like net-new users. This guide is about preventing that—by focusing on app-side install, identify timing, event tracking, and how profiles get stitched together.
How It Works
SDK 3.x is still doing the same job for retention: it captures app activity, ties it to a person, and sends events/attributes into Customer.io so campaigns can segment and trigger correctly. The difference is that upgrades usually force you to re-check assumptions about identity, device handling, and event shape.
- Installation initializes a device context. The SDK starts collecting data in an anonymous state until you explicitly identify a user (or until you set an identifier depending on your implementation). If you don’t plan for that anonymous window, you’ll lose high-intent signals like product views and add-to-cart before login.
identifyis the retention “join key.” The moment you callidentify(userId)(and optionally set traits like email/phone), you’re telling Customer.io which profile should own past and future events. If you call it late, you’ll undercount browse/cart intent. If you call it inconsistently, you’ll create duplicates that split lifecycle messaging.- Event tracking is only useful if payloads are stable. Your campaigns depend on event names and properties staying consistent across versions. A small change like renaming
product_idtoskucan silently break a browse abandon branch or an upsell segment. - Identity stitching is where most upgrades go sideways. D2C apps often collect intent anonymously (session starts, PDP views) and convert later (account creation, checkout). Your job during the 2.x → 3.x move is to ensure anonymous activity merges into the known profile once the user identifies—otherwise your “viewed but didn’t buy” audiences shrink and your reactivation targeting gets noisy.
Real scenario: A shopper opens your app from an Instagram ad, views two products, adds one to cart, then bounces. If your SDK doesn’t track those events anonymously—and then merge them when they later log in—your cart recovery flow won’t fire, and your browse abandon program will miss the highest-intent users.
Step-by-Step Setup
Before you touch code, align on what “correct” means for retention: which events trigger money-making journeys, which properties power segmentation, and what identifiers you trust. Then implement the upgrade so the data stays compatible with your existing campaigns.
- Inventory retention-critical events and properties.
Pull a list of the events your campaigns depend on (common ones:Product Viewed,Added to Cart,Checkout Started,Order Completed). For each, document required properties (e.g.,product_id,variant_id,price,currency,quantity,cart_value). - Upgrade the SDK to 3.x in your app.
Do the version bump and initialization changes required by your platform (iOS/Android/React Native/etc.). Treat this as a release with analytics QA, not a background task. - Implement (or re-validate) early anonymous tracking.
Ensure you track key intent events before login/account creation. If your app currently delays tracking until a user is known, you’re leaving retention money on the table. - Standardize your
identifycall timing.
Callidentifyimmediately when the user becomes known (login, account creation, or when you can confidently assign a stable customer ID). Don’t wait until checkout success—by then you’ve lost the pre-purchase signals that power recovery flows. - Send traits that your messaging actually uses.
At identify time (or right after), set attributes likeemail,phone,first_name,timezone,marketing_opt_in, andpush_enabled. If these drift during the upgrade, you’ll see suppression spikes or channel eligibility issues. - Re-implement event tracking with a compatibility mindset.
Keep event names and property keys consistent with what your segments and campaigns expect. If you must change anything, plan the migration: dual-write old+new keys temporarily, or update segments first. - Validate identity stitching end-to-end.
Run a test flow: anonymous browse → add to cart → close app → reopen → login → purchase. Confirm that pre-login events appear on the same Customer.io profile after identify, and that campaigns trigger as expected. - Roll out with a staged release and monitoring.
Ship to internal users, then a small % of production. Watch event volume, unique users, and duplicate profile creation. Most issues show up as “everything looks fine” until your segments quietly stop matching.
When Should You Use This Feature
You do this upgrade when retention performance depends on app-side fidelity—especially if your app is a meaningful revenue channel (not just a wrapper around web checkout). The goal isn’t “latest SDK,” it’s cleaner identity and more reliable triggers.
- Cart recovery that relies on in-app add-to-cart. If your cart is app-native (not purely Shopify web), SDK accuracy determines whether abandoners even enter the journey.
- Browse abandon and product discovery flows. These need high-volume PDP and collection events, often before login. SDK 3.x is worth it if it helps you capture and merge that anonymous intent reliably.
- Repeat purchase and replenishment. If you trigger “time-to-reorder” off purchase and product metadata, you need stable order events and consistent product identifiers.
- Reactivation based on app engagement. If you suppress winback for recently active users, you need accurate session/app-open events tied to the right profile.
Operational Considerations
The upgrade is rarely blocked by code—it’s blocked by messy identity, inconsistent naming, and teams shipping without a data contract. If you want campaigns to keep printing money, handle these realities upfront.
- Segmentation depends on property consistency. If your “High intent” segment filters on
Added to Cartwherecart_value > 75, and your new payload sendsvalueinstead, your segment goes dead without throwing an error. - Data flow is multi-source in D2C. App SDK events, server-side order events, and Shopify/Stripe sources often overlap. Decide which source is canonical for purchases and refunds, then keep the others as enrichment—not competing truth.
- Orchestration breaks when identifiers aren’t stable. If you use email as an identifier in one place and an internal customer ID in another, you’ll split profiles. Pick one primary ID for
identifyand stick to it across app, web, and backend. - Anonymous-to-known merging is not optional. Most retention value in apps comes from pre-login intent. If your upgrade causes anonymous events to stop merging, your recovery programs will underperform even if deliverability and creative are great.
- QA needs to mirror real shopper behavior. Test with push enabled/disabled, logged in/out, reinstall scenarios, and multi-device behavior. These are exactly the edge cases that create duplicates and misfires.
Implementation Checklist
Use this as the “done means done” list before you roll SDK 3.x to 100% of users. It’s intentionally biased toward retention outcomes, not engineering completeness.
- Retention-critical events are documented (names + required properties) and match what campaigns/segments expect
- SDK 3.x initialized correctly on app launch (and does not crash or silently fail in production builds)
- Anonymous tracking captures PDP views, add-to-cart, and checkout start before login
identifyfires immediately on login/account creation with a stable primary ID- Traits required for channel eligibility are set (email/phone, opt-in flags, push token state)
- Purchase/order events are sourced consistently (no double-counting between SDK and server)
- Anonymous activity merges into the known profile after identify (validated in Customer.io profile activity)
- Key segments still match expected counts after upgrade (spot-check high-intent and reactivation audiences)
- Staged rollout plan in place with monitoring for event volume drops and duplicate profile spikes
Expert Implementation Tips
The teams that get this right treat tracking like a product surface: versioned, tested, and tied to revenue. A few patterns we’ve seen work well in most retention programs:
- Create a tracking “data contract” and enforce it. Lock event names and property keys, and require a deliberate migration plan for changes. This prevents silent segmentation failures.
- Dual-write during migrations. If you must rename properties, send both old and new keys for 2–4 weeks, update segments/campaigns, then remove the old key.
- Identify once, update traits often. Keep the primary ID stable; update attributes like
last_seen,push_enabled, and preference flags as they change. This keeps suppression logic and channel routing accurate. - Use server-side events for final revenue truth. Let the app SDK capture intent (views/carts), but use backend-confirmed purchase events to drive “thank you,” replenishment, and VIP logic. That reduces false positives from failed checkouts.
- Build a “tracking health” dashboard. Monitor daily counts for top events, unique identified users, anonymous events, and duplicate profile rate. You’ll catch regressions before revenue dips.
Common Mistakes to Avoid
Most SDK upgrades don’t fail loudly—they fail quietly, and you notice two weeks later when revenue from automations is down. These are the mistakes that usually cause that.
- Calling
identifytoo late. Waiting until checkout completion means your high-intent pre-purchase events stay anonymous and never power recovery journeys. - Changing event names “for cleanliness.” Renaming
Added to Carttoadd_to_cartwithout updating campaigns breaks triggers immediately. - Letting multiple IDs float around. Email-based identify on web, numeric ID in app, and phone in support tools leads to split profiles and inconsistent messaging frequency.
- Double-sending purchase events. If both the SDK and backend send
Order Completed, you’ll inflate LTV segments, mis-trigger replenishment, and send awkward “thanks for your order” messages twice. - Not testing reinstall / multi-device behavior. These flows are where duplicates and broken push eligibility show up first.
Summary
Upgrading from SDK 2.x to 3.x is only worth it if your identity stitching and event payloads stay stable. Get identify timing right, preserve event/property compatibility, and validate anonymous-to-known merging with real shopper flows. If those three hold, your retention automations keep performing while you modernize the stack.
Implement Update To 3x with Propel
If you’re already running meaningful cart recovery and repeat purchase programs, the SDK upgrade is a good moment to tighten the whole tracking contract—especially identity stitching across app/web/backend. We’ll typically review your current Customer.io event taxonomy, map it to the journeys that drive revenue, and help you QA the 3.x rollout so segments and triggers don’t degrade. If you want to sanity-check your plan before you ship, book a strategy call.