Summarize this documentation using AI
Overview
If you want reliable cart recovery, repeat purchase, and reactivation flows in Customer.io, the SDK package and configuration choices matter more than most teams expect—because they determine whether events actually stitch to the right customer profile. If you’re trying to tighten tracking and unblock retention automation quickly, book a strategy call and we’ll pressure-test your identity + event plan against your highest-impact journeys.
In most retention programs, the “packages” decision is really about picking the smallest SDK footprint that still captures the events and identifiers you need (login, add-to-cart, checkout started, purchase) without creating duplicate people or missing attribution.
How It Works
Customer.io SDKs generally break down into a core tracking layer plus optional modules (depending on platform) for things like push, in-app, and richer device context. The important operational concept is that the SDK is your source of truth for who did something (identity) and what they did (events)—and those two pieces have to line up cleanly for retention automation to behave.
- Package selection controls what data you can emit. Core packages cover identify + track. Optional packages typically add channel capabilities (push/in-app) or platform-specific helpers.
- Configuration controls when data is sent and how it’s attributed. Small toggles (auto device attributes, logging, environment keys, region endpoints, queueing) can change whether events arrive on time for a cart recovery window.
- Identity stitching is the retention unlock. Anonymous browsing/app activity is only valuable if it merges into the known customer when they log in or provide email/phone.
Real D2C scenario: A shopper installs your app, browses, adds a product to cart, then creates an account at checkout. If your SDK fires track("Add to Cart") before you’ve established an anonymous ID (or you never merge on login), Customer.io may store that cart event on a different profile than the eventual purchaser. Your cart abandonment flow either won’t trigger, or it will trigger on a “ghost” profile that can’t be messaged.
Step-by-Step Setup
The fastest path is to install the smallest package that supports your channels, then lock down identity and event conventions before you ship. In practice, this tends to break when engineering installs “everything” without a tracking spec—so you get noisy events and mismatched identifiers that make segmentation unreliable.
- Pick the SDK package per platform based on the channels you’ll actually use.
Start with core tracking. Add push/in-app modules only if you’re ready to orchestrate those channels in Customer.io (and have the required platform permissions/certificates). - Initialize the SDK with the right workspace credentials and environment.
Use separate keys/configs for dev vs prod so QA traffic doesn’t pollute revenue segments or trigger live recovery messages. - Implement anonymous tracking on app open/session start.
Make sure the SDK has a stable anonymous identifier before key funnel events fire (product viewed, add to cart, checkout started). - Call
identifyimmediately after login/account creation.
Pass your durable customer identifier (your internal customer ID) and map email/phone as attributes. This is the moment where pre-login activity should merge into the known profile. - Track retention-critical events with clean, consistent payloads.
At minimum:Product Viewed,Add to Cart,Checkout Started,Purchase. Include stable IDs (product_id, variant_id, cart_id, order_id) and value fields (price, quantity, revenue, currency). - Verify event arrival and profile stitching in Customer.io before launch.
Use Activity Logs / profile timelines to confirm: anonymous events appear, then merge into the identified profile after login, and the event properties look right. - Only then wire campaigns/journeys to those events.
Build cart recovery and post-purchase flows once you trust the data. Otherwise you’ll spend weeks debugging “why didn’t they enter?”
When Should You Use This Feature
SDK packages and configuration options matter any time you’re relying on app-side behavior to drive revenue. If you’re only sending batch promos from Shopify email lists, you can limp along. But the moment you want behavior-based retention, you need the SDK dialed in.
- Cart recovery from app sessions where a user adds to cart on mobile but completes later on web—requires consistent IDs and cross-device stitching strategy.
- Repeat purchase triggers like “replenishment reminder 21 days after purchase” that depend on accurate
Purchaseevents and order timestamps. - Reactivation segments like “installed app, browsed 3+ times, no purchase in 30 days” that require clean session + browse events.
- Channel expansion (push/in-app) where you need device tokens and permission state captured reliably to avoid wasted sends and skewed holdouts.
Operational Considerations
Most teams don’t fail because the SDK can’t track—they fail because the data doesn’t line up with how segmentation and orchestration work in the real world. Treat packages/config as part of your retention system design, not an engineering afterthought.
- Segmentation depends on stable naming and types. If
revenueis sometimes a string and sometimes a number, orPurchaseis also calledOrder Completedin another app version, your “buyers in last 30 days” segment will be leaky. - Identity strategy: pick a primary key and stick to it. Use an internal customer ID as the canonical identifier. Store email/phone as attributes, not as the primary identity anchor, so changes don’t fragment profiles.
- Cross-platform orchestration requires shared IDs. If web uses one cart_id format and app uses another, you can’t suppress duplicate recovery messages when a cart is recovered on a different device.
- Event timing impacts recovery windows. If the SDK queues events too aggressively (offline mode, background restrictions) your “send 30 minutes after checkout started” message might fire hours late and underperform.
- Versioning matters. When you change event schemas, keep backward compatibility long enough for active app versions in the wild—otherwise your segments split by app version without you realizing it.
Implementation Checklist
Before you call the SDK “done,” run this list like a pre-flight. It’s the difference between a cart recovery program that prints money and one that silently misses half the audience.
- Core SDK installed on each platform you support (iOS/Android/Web), plus only the optional modules you’ll actually use
- Separate dev/staging/prod configuration to prevent test traffic from entering live journeys
- Anonymous ID established before funnel events fire
identifycalled on login/account creation with internal customer ID + email/phone attributes- Anonymous activity merges into identified profile (verified in profile timeline)
- Event taxonomy documented (names, required properties, data types)
- Purchase event includes order_id, revenue, currency, and item-level details (product_id/variant_id/qty)
- Cart/checkout events include cart_id and item details to support suppression and personalization
- QA: events arrive within expected latency for your recovery delays
Expert Implementation Tips
These are the operator-level moves that keep your retention engine stable as you scale spend, add channels, and ship app updates.
- Design your events around decisions, not analytics vanity. If an event can’t power a segment, a suppression rule, or a message personalization block, it’s probably noise.
- Make cart recovery idempotent. Use
cart_id+ a “recovered” signal (purchase referencing cart_id, or checkout completion) so you can confidently exit customers from recovery flows. - Normalize product identifiers across systems. If Shopify uses variant IDs, mirror that in app events so you can use the same merchandising logic in email/push.
- Track permission state changes as events or attributes. Push opt-in is not static. If you don’t capture changes, you’ll misread channel performance and over-message email.
- Plan for guest checkout. If users can purchase without creating an account, decide how you’ll stitch that order to an existing anonymous/app profile (or accept that it won’t stitch and adjust your automation expectations).
Common Mistakes to Avoid
Most “Customer.io isn’t working” complaints in retention come down to a few predictable SDK mistakes. Fix these and your campaigns start behaving.
- Calling
identifywith email sometimes and customer_id other times. This fragments profiles and breaks frequency controls. - Tracking key events before an anonymous ID exists. Early funnel events end up orphaned and never trigger recovery.
- Inconsistent event names across platforms. Your iOS app fires
Added To Cart, Android firesAdd to cart, web firesadd_to_cart—now every segment needs three conditions. - Missing order_id on purchases. Without a unique order identifier, deduplication gets messy and LTV reporting becomes unreliable.
- Letting QA/test builds hit production. Test purchases and fake carts pollute high-intent segments and can trigger real messages to internal emails/phones.
- No merge validation. Teams assume anonymous-to-known merging “just happens,” then wonder why cart abandoners never enter the flow.
Summary
If you want retention automation you can trust, get the SDK package choice right, then obsess over identity and event consistency. Once anonymous activity reliably stitches to known customers, cart recovery and repeat purchase journeys become straightforward to run and optimize.
Implement Packages Options with Propel
When we help teams implement SDK packages and configuration in Customer.io, we usually start by mapping the 2–3 revenue-critical journeys (cart recovery, post-purchase cross-sell, reactivation) back to the exact identify + event requirements. If you want a second set of eyes on your package selection, identity stitching, and event schema before you scale campaigns, book a strategy call.
The goal isn’t “perfect tracking”—it’s tracking that’s dependable enough to power segmentation, suppression, and timing without constant firefighting.