Summarize this documentation using AI
Overview
If you’re using Customer.io for retention, SDK package choices and configuration aren’t “engineering hygiene” — they directly determine whether cart recovery and repeat purchase flows trigger on time and on the right person. If you want a second set of eyes on your tracking plan before it ships (or before you migrate SDKs), book a strategy call and we’ll pressure-test identity stitching, event taxonomy, and the minimum viable payloads needed for real revenue journeys.
In most D2C programs, the biggest retention leak isn’t creative — it’s missing or mis-attributed events (anonymous browsing never merges, “Added to Cart” fires twice, purchase events don’t include order context). Getting SDK packages and configuration right is how you keep segments clean and automations reliable.
How It Works
Think of Customer.io’s SDK packages as two things: (1) the transport layer that sends app/web activity to Customer.io, and (2) the identity layer that decides whether activity belongs to an anonymous visitor, a logged-in customer, or both (stitched together). Your configuration choices determine what gets captured automatically vs what you must track manually, and how consistently you can join pre-login behavior to a real customer profile.
- Installation loads the SDK runtime so your app/web client can send identify calls and track events to Customer.io with low latency.
- Identify calls create/stabilize the person profile by setting a durable identifier (your internal customer ID is ideal) and attaching attributes like email, phone, acquisition source, and consent flags.
- Event tracking drives entry into retention automations (Journeys/Campaigns) and powers segments like “Added to Cart in last 2 hours but no Purchase.”
- Anonymous-to-known stitching is the make-or-break: if someone browses and adds to cart while anonymous, then logs in at checkout, you need the SDK configured so those earlier events merge onto the known profile. Otherwise your cart recovery triggers either never fire or fire against a ghost profile that can’t be messaged.
Real D2C scenario: a shopper on mobile adds a bundle to cart, gets distracted, then returns later and logs in to check shipping. If your SDK doesn’t merge anonymous activity at login, you’ll miss the “cart abandonment” trigger on the actual customer — and your recovery email/SMS won’t go out (or will go out with empty cart context).
Step-by-Step Setup
The goal here is simple: ship the smallest SDK footprint that still gives you accurate identity and the few events that actually power revenue. Don’t over-instrument on day one — but don’t skip the identity pieces, because you can’t retroactively stitch what you never tied together.
- Choose your SDK package(s) based on channels you’ll use.
If you plan to send mobile push or in-app, make sure the mobile SDK package you install supports device registration and token handling. If you’re web-first, ensure your web SDK package supports anonymous tracking and clean handoff on login. - Implement a single source of truth for the customer identifier.
Use your internal customer ID (not email) as the primary identifier wherever possible. Email changes; IDs don’t. Keep a consistent mapping between app/web and backend. - Call identify at the right moments (not just once).
Fire identify when:- account is created
- login succeeds
- email/phone changes
- consent status changes (SMS opt-in, push permission, marketing opt-out)
email,phone,sms_consent,push_permission,first_order_date(if known),locale,timezone. - Ensure anonymous activity is captured before login.
Configure the SDK so it can track events for anonymous users (product views, add-to-cart) and maintain the anonymous identifier until you identify the person. - Stitch anonymous-to-known on login.
At login, run identify in a way that merges the anonymous profile/activity into the known profile. This is the step that prevents duplicate profiles and “missing cart” journeys. - Track a tight, retention-focused event set.
Start with:Product Viewed(includeproduct_id,category,price)Added to Cart(includeproduct_id,variant_id,quantity,cart_id,cart_value)Checkout Started(includecart_id,cart_value,items_count)Purchase(includeorder_id,revenue,currency,items,discount_code)
Subscription Created/Subscription Canceled. - Validate in Customer.io before you build journeys.
Confirm the person profile shows the right identifier, attributes, and a clean event timeline (no duplicates, no missing parameters). Only then build cart recovery and post-purchase flows.
When Should You Use This Feature
SDK package selection and configuration matters most when you’re relying on app/web behavior to trigger revenue messaging. If your retention program depends on “what they did” (not just “who they are”), you need tight tracking and reliable stitching.
- Cart recovery that needs product-level context: cart events must include
cart_idand items so you can personalize reminders and avoid sending “you left something behind” with no item details. - Repeat purchase and replenishment: purchase events need clean order payloads so you can segment “bought SKU X 21–28 days ago” and trigger replenishment nudges.
- Reactivation based on browsing intent: if a lapsed customer starts browsing again (anonymous or logged-out), stitching ensures you can treat that as a reactivation signal and message them appropriately.
- Cross-device journeys: if someone browses on web and buys in-app (or vice versa), consistent identifiers and event naming prevent fragmented profiles and broken frequency controls.
Operational Considerations
Once the SDK is live, the real work is keeping the data usable for segmentation and orchestration. In practice, retention tends to break when event naming drifts, identity rules aren’t enforced, or payloads change without marketing knowing.
- Segmentation depends on stable schemas.
Lock event names and required properties (e.g.,order_idis always present onPurchase). If engineering changes payloads, your “Purchased but not subscribed” segment can silently fail. - Data flow timing affects recovery windows.
Cart recovery often runs on tight delays (15–60 minutes). If SDK events batch too slowly or get dropped offline, you’ll message late and conversion falls off. - Identity stitching impacts suppression and frequency.
Duplicate profiles lead to double-sends (two abandon messages to the same human) or missed suppression (one profile purchases, the other still gets recovery). - Orchestration needs channel readiness.
If you plan to use push, you need device tokens tied to the same profile that receives email/SMS. Otherwise you’ll “think” you’re doing omnichannel but actually running parallel, inconsistent programs.
Implementation Checklist
If you want this to drive revenue quickly, treat the checklist below as the minimum bar before launching cart recovery, post-purchase upsells, or winback journeys.
- SDK installed on all relevant clients (iOS/Android/web) with the correct environment keys
- One durable customer identifier chosen and used consistently across platforms
identifyimplemented on signup, login, and profile changes- Anonymous tracking enabled pre-login
- Anonymous-to-known merge verified during login/checkout
- Core event set implemented: Product Viewed, Added to Cart, Checkout Started, Purchase
- Event payload requirements documented (required vs optional properties)
- QA pass confirms: no duplicate firing, correct timestamps, correct currency/revenue formatting
- Customer.io segments validate correctly against real test users
Expert Implementation Tips
The difference between “events are flowing” and “retention prints money” is usually a handful of operator decisions that keep the data clean and automation-friendly.
- Prefer server-confirmed purchase when possible, but don’t ignore the SDK.
For D2C, purchases are often best confirmed server-side to avoid fraud/duplication. Still track client-side milestones (add-to-cart, checkout started) because that’s what powers recovery. - Use a shared cart identifier across app and web.
If your cart can persist cross-device, pass a stablecart_idso “Added to Cart” and “Purchase” can be linked. This makes suppression and personalization much more reliable. - Send consent changes as attributes immediately.
If SMS opt-in is delayed, you’ll either miss the highest-intent window or accidentally message without consent. Keepsms_consentandpush_permissioncurrent. - Design payloads for segmentation, not analytics vanity.
Include the 3–6 properties you’ll actually use to branch journeys (category, price band, subscription status, discount code). Extra noise increases breakage.
Common Mistakes to Avoid
Most teams don’t fail because they didn’t track anything — they fail because they tracked “kind of” and then built automations on top of shaky identity and inconsistent events.
- Using email as the primary identifier.
Email changes and can be missing pre-checkout. Use an internal ID and store email as an attribute. - Not stitching anonymous activity at login.
This is the classic reason cart recovery underperforms: the cart events live on an anonymous profile that never gets messaged. - Event names that drift by platform.
“AddToCart” on iOS and “Added to Cart” on web creates fragmented segments and duplicate journey logic. - Duplicate purchase firing.
A client-side purchase event plus a server-side purchase event can double-trigger post-purchase flows unless you dedupe usingorder_id. - Missing currency/revenue normalization.
If one platform sends cents and another sends dollars, your “VIP” segmentation becomes nonsense fast.
Summary
SDK packages and configuration are retention infrastructure: they determine whether Customer.io sees the right person, at the right time, with the right intent signals. If you’re running cart recovery, replenishment, or winback, prioritize identity stitching and a small set of high-integrity events. Once that’s stable, scaling journeys becomes straightforward.
Implement Packages Options with Propel
If you’re rolling out or refactoring your SDK tracking, it’s worth treating it like a revenue project, not a dev task. We’ll help you map the exact events/attributes your retention program needs in Customer.io, validate identity stitching across anonymous and logged-in states, and set up the segments that keep orchestration clean as you scale. When you’re ready, book a strategy call and we’ll walk through your current implementation and what’s likely to break in production.