Summarize this documentation using AI
Overview
If you’re upgrading your app instrumentation, the goal isn’t “get the SDK compiling”—it’s protecting the data that powers your highest-leverage retention flows in Customer.io. If you want a second set of eyes on identity stitching, event parity, and keeping cart + purchase automations stable during the cutover, book a strategy call and we’ll pressure-test your plan.
In most D2C apps, the Flutter SDK upgrade to 2.x becomes a retention project the moment you realize how many automations depend on “one missing event” or “a user who never got identified.” Done right, you keep cart recovery, browse follow-ups, and repeat purchase journeys firing with clean attribution—without resetting your audience history.
How It Works
Flutter SDK 2.x changes how your app talks to Customer.io: you initialize the SDK, identify a person (or intentionally keep them anonymous), and then send events/attributes that Customer.io uses for segmentation and orchestration. The retention win is accuracy—especially around identity stitching between anonymous sessions (pre-login) and known users (post-login).
- Initialization: the SDK boots early in app lifecycle so events don’t get dropped on cold start.
- Identity: you call
identifywhen you know who the user is (login/account creation). That’s the moment Customer.io can reliably attach events to a person profile. - Anonymous-to-known stitching: if a shopper browses and adds to cart before logging in, you want those events to merge into the eventual known profile—otherwise cart recovery and product discovery journeys misfire or underperform.
- Event tracking: you send high-signal events (e.g.,
Product Viewed,Add to Cart,Checkout Started,Order Completed) with consistent properties so segments and campaign filters don’t break during/after the upgrade. - Attribute updates: you keep durable profile fields (email, phone, push permission, last_order_at, lifetime_value) current so reactivation and repeat purchase logic stays stable.
Real D2C scenario: a shopper adds a moisturizer to cart while anonymous, then logs in to check shipping. If you don’t stitch identity correctly during the 2.x upgrade, Customer.io sees “anonymous cart” and “known checkout” as two different people—your cart abandonment flow either never triggers (no known identity) or triggers incorrectly (wrong profile), and your post-purchase cross-sell misses the browse context.
Step-by-Step Setup
Treat the upgrade like a data migration, not a dependency bump. Your north star is event parity (same event names + properties) and identity correctness (the same human ends up with one profile).
- Audit your current tracking map
- Export a list of all app events currently used in Customer.io segments, campaign triggers, filters, and goals.
- Flag “automation-critical” events: cart, checkout, purchase, subscription, push permission, app lifecycle events.
- Upgrade the Flutter SDK to 2.x in your app
- Follow the Customer.io Flutter 2.x upgrade path from your current version.
- Plan for a short period where you may run old/new tracking in parallel (behind a feature flag) to validate parity.
- Initialize the SDK early
- Initialize on app start so first-session events (install/open/deeplink) don’t get lost.
- Confirm environment config (dev/stage/prod) maps to the correct Customer.io workspace to avoid polluting production segments.
- Implement
identifyat the right moments- Call
identifyon sign up and login (not on app open). - Use a stable identifier strategy (commonly your internal
customer_id), and attach email/phone as attributes where appropriate. - Make sure you don’t re-identify with a different ID for the same user (this is how duplicate profiles happen).
- Call
- Track retention-critical events with consistent naming
- Keep event names identical to what your Customer.io automations expect (or update the automations intentionally).
- Send properties that power segmentation (e.g.,
sku,category,price,currency,cart_value,quantity).
- Validate identity stitching with an end-to-end test
- Test flow: anonymous browse → add to cart → login → checkout → purchase.
- Confirm in Customer.io that events appear on a single person profile after login.
- Roll out gradually
- Use staged rollout (internal users → small % of users → full release).
- Monitor event volumes and key segments for sudden drops/spikes.
When Should You Use This Feature
You don’t upgrade to 2.x because it’s “new.” You upgrade when you need more reliable app-side tracking and cleaner identity handling—because that’s what keeps retention automations from quietly degrading.
- Cart recovery depends on app events: if your checkout happens in-app (not on web), you need consistent
Add to CartandCheckout Startedevents tied to a known profile. - Repeat purchase programs rely on accurate purchase + product properties: replenishment, cross-sell, and post-purchase education all break when
Order Completedis missing line-item detail. - Reactivation needs trustworthy “last activity” signals: app opens, product views, and push permission status help you avoid blasting users who are active but not purchasing.
- You’re seeing duplicate profiles or unattributed events: usually caused by inconsistent identifiers or identifying too late/too early.
Operational Considerations
The hard part isn’t the SDK calls—it’s keeping your segmentation and orchestration stable while data is changing underneath you. In practice, this tends to break when teams ship the upgrade and only realize later that a key segment stopped populating.
- Segmentation parity: if you rename events/properties, update every dependent segment, trigger, filter, and goal. Otherwise you’ll get “silent failures” (journeys that never start).
- Data flow timing: mobile events can arrive delayed/offline. Build cart and browse flows with reasonable grace periods (e.g., wait 30–90 minutes before declaring abandonment) to reduce false positives.
- Identity stitching rules: decide what happens when a user logs out, switches accounts, or uses multiple emails. Document it and implement it consistently or your audiences will fragment.
- Environment hygiene: keep staging data out of production. One bad staging build can flood production with fake purchases and ruin your LTV segments.
- Orchestration with web: if you also track web (Shopify storefront, headless web), align event taxonomy so “Product Viewed” means the same thing across platforms.
Implementation Checklist
Before you call the upgrade “done,” you want proof that the events your retention engine runs on still fire, still stitch, and still segment cleanly.
- SDK 2.x installed and initializing at app start
identifycalled on signup/login with a stablecustomer_id- Anonymous pre-login events merge into the known profile after login
- Event names match what Customer.io campaigns/segments expect
- Purchase event includes order_id, value, currency, and line items (if used for personalization)
- Key segments (cart abandoners, recent purchasers, high intent browsers) show expected daily volumes
- Staged rollout completed with monitoring for event volume anomalies
Expert Implementation Tips
This is where operators usually squeeze the performance lift: not by adding more messages, but by making the data more dependable so existing programs hit harder.
- Send “Checkout Started” as early as possible: if you only track at payment submit, you miss the highest-intent abandoners.
- Normalize product identifiers: pick one canonical field (
skuorproduct_id) and use it everywhere. It makes product-based suppression and cross-sell logic much cleaner. - Track push permission state as an attribute: then route cart recovery to push vs email based on reality, not assumptions.
- Use a feature flag for dual tracking during the cutover: run old + new event payloads for a small cohort, compare in Customer.io, then fully switch.
- Build a “tracking health” segment: e.g., users identified in last 7 days with zero events. That’s your early warning system for broken instrumentation.
Common Mistakes to Avoid
Most retention tracking issues aren’t dramatic—they’re subtle. You only notice after revenue dips because your best automations stopped qualifying people.
- Identifying with email sometimes and customer_id other times: this is a duplicate-profile factory.
- Changing event names during the upgrade without updating automations: segments go empty and journeys stop enrolling.
- Tracking purchases without order_id: you can’t dedupe, and you’ll overcount conversions or spam post-purchase flows.
- Firing events before identify when you actually know the user: you lose attribution and weaken personalization.
- Testing only “happy path”: you also need logout/login-as-different-user, offline mode, app reinstall, and interrupted checkout tests.
Summary
Upgrade to Flutter SDK 2.x when you need cleaner identity stitching and more reliable app-side events—the stuff your retention engine runs on.
If you protect event parity and validate anonymous-to-known merges, your cart recovery and repeat purchase programs keep performing through the cutover.
Implement 2.x Upgrade with Propel
If you’re treating this as a retention stability project (not just an engineering task), it helps to run a tight cutover plan: event parity audit, identity rules, staged rollout, and segment monitoring inside Customer.io. If you want us to sanity-check your tracking map and the specific automations at risk (cart, post-purchase, winback), book a strategy call and we’ll walk through it like operators.