Summarize this documentation using AI
Overview
Customer.io only performs as well as the identity and event data you feed it—especially when you’re relying on SDK tracking from your app (or web) to drive cart recovery, repeat purchase, and reactivation. If you want a second set of eyes on your tracking plan before you lock it in, you can book a strategy call and we’ll pressure-test the events, naming, and stitching approach against your retention goals.
At a practical level, “how it works” is simple: your app sends Customer.io a person profile (attributes), device identifiers (for push), and behavioral events. Journeys then listen for those events and attributes to decide who enters, what they receive, and when they exit.
How It Works
In retention programs, the difference between a campaign that prints money and one that quietly underperforms usually comes down to tracking accuracy and identity stitching. The SDK is the workhorse here: it captures app behavior in real time, ties it to a device, and—once you identify the user—ties it to a person so you can orchestrate across email, SMS, and push without splitting the customer into multiple “half-profiles.”
- Install the SDK in your app so you can send events and manage devices (especially for push). This is where you get reliable “what happened” signals like
product_viewed,add_to_cart, andcheckout_started. - Start anonymous when you need to (common in D2C browsing). A shopper can view products and build a cart before logging in or entering email—those events still matter for recovery and personalization.
- Call
identifythe moment you can (login, account creation, email capture, order confirmation). This is the handoff that stitches pre-identify activity to the known customer profile so your “cart abandon” journey doesn’t miss the session that mattered. - Track events with properties so Journeys can segment and branch without brittle logic. Example:
add_to_cartshould includesku,product_type,price,quantity, and ideallycart_value. - Update person attributes when state changes (e.g.,
last_order_date,lifetime_value,vip_tier,push_opt_in). Journeys use these to throttle, prioritize, and personalize.
Real D2C scenario: A shopper on iOS adds two items to cart, gets distracted, and closes the app. If you tracked add_to_cart but never stitched identity (because email capture happens at checkout), your push cart recovery can still fire to the device—but your email/SMS recovery won’t trigger until you connect that behavior to the person. The fix is usually a lightweight email capture earlier (or identifying at login) so the same cart events power both push and email.
Step-by-Step Setup
Most teams get the SDK “installed” and stop there. The wins come from being deliberate about when you identify, how you name events, and which properties you standardize so your Journeys don’t turn into a mess of one-off conditions.
- Install the Customer.io SDK for your platform (iOS/Android/React Native/Flutter/web). Confirm you can send a basic test event from a dev build.
- Define your identity strategy:
- Pick the canonical
customer_idyou’ll use everywhere (app, web, backend). - Decide when you’ll call
identify(customer_id)(login, email capture, order placed). - Decide what you do when a user logs out (typically reset to anonymous so you don’t leak behavior across accounts on shared devices).
- Pick the canonical
- Implement
identifyand attribute updates:- On identify, send core attributes like
email,phone(if collected),first_name,country, and consent flags (sms_opt_in,email_opt_in). - On key moments, update attributes (e.g., after purchase set
last_order_date, incrementorders_count, updatelifetime_valueif you maintain it app-side or via backend sync).
- On identify, send core attributes like
- Track a retention-first event taxonomy (keep names stable; properties do the heavy lifting):
product_viewed(sku, category, price)add_to_cart(sku, quantity, cart_value)checkout_started(cart_value, items_count)purchase_completed(order_id, revenue, items, discount_code, subscription_flag)push_permission_status(granted/denied) or a person attribute likepush_opt_in
- Register devices for push and confirm tokens map to the identified user. This is where a lot of “we sent push but nobody got it” issues originate.
- Validate in Customer.io:
- Open a test profile and confirm: attributes are present, events are arriving with properties, and device info exists.
- Trigger a test Journey off an SDK event and confirm entry + message send.
- Harden the pipeline:
- Add retry logic / offline queueing where your SDK supports it (mobile connectivity is messy).
- Version your event schema internally so product changes don’t silently break Journeys.
When Should You Use This Feature
SDK-driven tracking is the right move when you need high-fidelity behavioral signals and fast orchestration—especially for mobile-first brands where email alone won’t catch the customer at the right moment.
- Cart recovery that actually reflects app behavior: trigger push within minutes of
checkout_started, then fall back to email if nopurchase_completedarrives. - Repeat purchase acceleration: start replenishment Journeys off
purchase_completedwith product-aware timing (e.g., supplements vs skincare vs pet food). - Browse and product discovery nudges: if someone fires
product_viewed5+ times in a category but never adds to cart, send a push with best-sellers or a quiz—without waiting for an email capture. - Reactivation based on true inactivity: use “no app_open / no product_viewed in 30 days” plus “has purchased before” to target lapsed buyers, not just quiet subscribers.
Operational Considerations
The SDK is only half the job. The other half is making sure your segmentation and orchestration don’t crumble under real-world identity edge cases—multiple devices, shared phones, uninstall/reinstall, and users who browse anonymously for weeks.
- Segmentation depends on consistent properties: if
categoryis sometimes “Skin Care” and sometimes “skincare,” your category-based recovery and cross-sell segments will drift. Standardize enums early. - Identity stitching is where most retention programs break: if you identify too late (only at purchase), you lose the ability to recover carts via email/SMS and you under-attribute browse intent. Identify at login and at email capture—then merge cleanly.
- Event latency changes message timing: mobile events can arrive late. Build Journeys with buffers (e.g., wait 15–30 minutes before declaring “abandoned”) and use exit conditions when
purchase_completedcomes in. - Orchestration across channels needs a single source of truth: decide whether app-side events or backend order events are authoritative for purchase. In practice, backend-confirmed purchases reduce false positives (like Apple Pay failures) but can add delay.
- Frequency control is not optional: cart recovery + browse nudges + winback can easily stack. Use global message limits and Journey-level guards so you don’t burn push opt-ins.
Implementation Checklist
If you want this to hold up once you scale spend and traffic, treat the SDK like production infrastructure—because your retention revenue will depend on it.
- SDK installed and sending test events from each platform/build variant
- Canonical
customer_iddefined and used consistently across app/web/backend identifyimplemented at login and email capture (not just at purchase)- Core person attributes mapped (email/phone/locale/consent flags)
- Event taxonomy implemented with standardized properties (sku/category/price/cart_value)
- Push device registration verified on real devices (not just simulators)
- Anonymous-to-known stitching tested (browse → identify → Journey triggers correctly)
- Journeys include exit conditions for purchase and sensible delay buffers
- Message limits/frequency rules defined to prevent channel pileups
- Ongoing monitoring plan (schema changes, missing events, duplicate profiles)
Expert Implementation Tips
These are the small operator moves that keep your programs profitable when volume increases and the edge cases show up.
- Track intent, not just steps:
search_performedandfilter_appliedoften predict purchase better than raw page views. Use them to personalize browse follow-ups. - Use properties to avoid Journey sprawl: one cart Journey can handle 80% of cases if you branch on
cart_value,items_count, andproduct_typeinstead of building separate flows. - Prefer backend confirmation for revenue metrics but keep SDK events for speed. A common pattern is: SDK triggers the first push quickly; backend purchase event exits the flow reliably.
- Instrument “soft failures”: track
payment_failedorcheckout_errorwith error codes. Those customers need a different recovery message than a generic abandoner. - Design for multiple devices: if a customer browses on mobile but buys on desktop, you still want the purchase to exit mobile Journeys. That only works when identity is consistent across surfaces.
Common Mistakes to Avoid
Most retention teams don’t fail because they lack campaigns—they fail because the data makes the campaigns unreliable. These are the repeat offenders.
- Identifying users too late: waiting until
purchase_completedto identify means your highest-intent sessions remain anonymous and un-actionable for email/SMS recovery. - Event names that change over time: renaming
add_to_carttoadded_to_cartmid-sprint silently breaks Journeys. Keep names stable; evolve via properties. - Missing critical properties: without
skuorcart_value, you can’t prioritize high-value abandons or tailor cross-sells. - No logout/reset handling: shared devices can pollute profiles if you don’t reset identity on logout.
- Assuming events are real-time: mobile networks drop. If your Journey logic assumes instant delivery, you’ll misclassify customers and over-message.
- Push token issues ignored until launch: tokens expire, permissions change, and reinstall happens. Validate on real devices and track permission state.
Summary
If you’re running retention out of Customer.io, the SDK is how you get timely, accurate behavioral triggers—and how you stitch anonymous browsing into known customer profiles. Get identify timing and event properties right, and cart recovery + repeat purchase automations become predictable. Get them wrong, and you’ll spend months debugging “why didn’t they enter the Journey?”
Implement How It Works with Propel
When we implement SDK tracking for retention, we usually start by mapping the 5–8 events that drive 80% of revenue (cart, checkout, purchase, replenishment signals), then we pressure-test identity stitching across anonymous sessions and multiple devices inside Customer.io. If you want help turning your tracking plan into Journeys that don’t break under real traffic, book a strategy call and we’ll walk through your current instrumentation and the retention flows it should unlock.