Summarize this documentation using AI
Overview
If you want Customer.io to drive real retention outcomes (cart recovery, repeat purchase, reactivation), your SDK event tracking has to be consistent, identity-safe, and debuggable. If you’re rebuilding tracking or trying to fix “why didn’t this user enter the flow?”, it’s usually faster to map the event plan first—if you want a second set of eyes, book a strategy call and we’ll pressure-test your schema against your retention roadmap.
In most retention programs, the difference between “nice dashboards” and “revenue-driving automations” is whether your app sends the right events at the right moment—with stable user identity stitching from anonymous browsing through purchase.
How It Works
Customer.io uses events as the behavioral backbone for segmentation and orchestration. On the SDK side, you’ll generally do three things: initialize the SDK, identify the person (so events attach to the right profile), and track events with a clean payload that your campaigns can reliably filter on.
- SDK initialization happens at app start so the SDK can queue events and attach device context.
- Anonymous activity first, identity later is normal in D2C: a shopper browses products before logging in or checking out. You track those events anonymously, then call identify when you learn who they are (email/phone/customer_id). Done correctly, this is how you stitch pre-checkout intent to post-checkout messaging.
- Track events for key behaviors (viewed product, added to cart, started checkout, purchase) with properties that make segmentation practical: SKU, category, cart value, currency, and timestamps.
- Customer.io consumes events to: (1) trigger Journeys, (2) qualify users into segments, and (3) support frequency/goal logic (e.g., stop cart recovery once Purchase fires).
Real D2C scenario: A shopper adds a hoodie to cart on mobile, gets distracted, and closes the app. If your SDK tracks Added to Cart with sku, cart_value, and a stable anonymous identifier, then later you identify them at checkout (or when they enter email for shipping updates), you can still recover that cart with a push/email sequence that references the exact product and exits immediately when Order Completed arrives.
Step-by-Step Setup
Before you touch code, align on the minimum event schema you’ll actually use in retention. In practice, teams over-track random UI clicks and under-track the 6–10 events that power 80% of revenue automations.
- Install the correct Customer.io SDK for your app
Add the SDK for iOS/Android/React Native/Flutter (whichever matches your stack), and confirm it loads on app start. Your goal here is simple: the SDK initializes early enough to capture first-session intent. - Initialize the SDK at app launch
Configure it with your workspace/site credentials and environment (prod vs staging). Use staging to validate events without polluting production segments. - Define your identity strategy (this is where most retention tracking breaks)
Decide what your “source of truth” identifier is—typicallycustomer_id(internal) plusemailand/orphone. Document when you learn each one (guest browse, account creation, checkout, post-purchase). - Call identify as soon as you have a reliable user identifier
When a user logs in, creates an account, or provides email/phone at checkout, callidentifywith that identifier and core attributes you’ll segment on (e.g.,first_name,accepts_marketing,customer_tier,country). - Track your retention-critical events with consistent naming
Start with a tight set:Product Viewed(sku, category, price)Added to Cart(sku list, cart_value, currency)Checkout Started(cart_value, item_count)Order Completed(order_id, revenue, discount_code, items)Subscription Created(if applicable: plan, cadence)
- Validate event delivery in Customer.io
Use a test device and a staging workspace/project. Confirm:- Events appear on the person profile activity timeline
- Properties are populated as expected (no null SKU, no “$19.99” strings where you need numbers)
- Anonymous-to-known stitching behaves as expected after identify
- Wire events into Journeys with clear entry + exit logic
Example: Cart Recovery enters onAdded to Cart, waits 1 hour, sends push, waits 20 hours, sends email, exits immediately whenOrder Completedhappens.
When Should You Use This Feature
SDK event tracking is the right move when you need high-fidelity behavioral signals from the app—especially when web tracking or server-side events don’t capture the full story. For D2C retention, it’s the difference between “generic blasts” and precise, behavior-driven automation.
- Cart recovery inside the app when you want push/in-app follow-ups based on real cart state, not just a checkout page view.
- Repeat purchase timing when replenishment depends on product usage (e.g., “Order Completed” + SKU-level cadence) and you want to suppress promos for customers who already reordered.
- Reactivation when you need to detect silent churn (no app opens, no product views) and trigger winback flows only for users who previously showed purchase intent.
- Product discovery nudges when someone views a category multiple times but doesn’t add to cart—great for personalized browse abandonment.
Operational Considerations
Once tracking is live, the operational work is keeping data clean enough that segmentation and orchestration don’t become a weekly fire drill. Most teams don’t fail on “sending an event”—they fail on consistency, identity, and event/property drift over time.
- Segmentation depends on property hygiene. If
categoryis sometimes “Tees” and sometimes “t-shirts”, your segments will undercount and your automations will look broken. - Identity stitching needs a single rule. Decide whether Customer.io’s primary identifier is email, phone, or internal ID—and stick to it. If you identify the same person with different IDs across devices, you’ll fragment profiles and double-send.
- Event timing impacts orchestration. If
Order Completedarrives late (or only server-side) whileAdded to Cartis instant, cart recovery can send to buyers unless you add a buffer or a “purchase check” step. - Mobile offline behavior is real. SDKs may queue events when the device is offline. That can create “late” events that backfill into Customer.io—plan your Journey delays and exit conditions accordingly.
- Staging vs production separation prevents test events from polluting LTV segmentation and holdout tests.
Implementation Checklist
If you want this to hold up once campaigns scale, treat the checklist below like a launch gate. It’s much cheaper to fix naming and identity now than after 20 automations depend on it.
- SDK installed and initialized at app start (staging + production)
- Documented identity plan: anonymous behavior → identify moment → stitched profile
- Stable event naming convention (Title Case or snake_case, but consistent)
- Event property dictionary for each key event (types defined: string/number/array)
- Verified events show on person profiles with correct properties
- At least one Journey triggered by an SDK event with a purchase-based exit condition
- QA plan for duplicates (double taps, retries) and late-arriving events
Expert Implementation Tips
These are the operator moves that keep retention programs stable as volume grows and more teammates touch tracking.
- Track “state change” events, not UI events. “Added to Cart” should mean cart state actually changed, not that someone opened a drawer.
- Prefer SKU-level arrays over concatenated strings. You’ll want to filter/branch by SKU or category later, and parsing strings inside orchestration is painful.
- Send numeric revenue fields as numbers. If you send “29.99” as a string, you’ll regret it when you try to segment by AOV or build tiered offers.
- Build a ‘tracking QA’ segment. Create an internal segment for employees/test devices and route them through a sandbox Journey so you can validate changes without touching production flows.
- Use event versioning when you must change schema. If you need to change payload shape, create
Added to Cart v2temporarily and migrate workflows before deprecating v1. Silent property changes are what break programs.
Common Mistakes to Avoid
Most “Customer.io isn’t working” issues are really tracking issues. Avoid these and you’ll save yourself weeks of debugging.
- Identifying too late. If you only identify after purchase, you lose the ability to recover carts for guest shoppers who gave you email at checkout start.
- Multiple identifiers for the same person. Email on web, phone on mobile, internal ID in the backend—without a clear stitching strategy, you’ll create duplicates and double-send.
- Inconsistent event names across platforms. If iOS sends
AddedToCartand Android sendsAdded to Cart, your segments will miss half your audience. - Tracking PII in event properties. Keep sensitive data out of event payloads; use person attributes where appropriate and follow your privacy policy.
- No exit conditions. Cart and browse abandonment flows without a purchase exit will inevitably message customers who already converted.
Summary
If you want Customer.io to perform like a retention engine, your SDK events need clean identity, stable naming, and payloads built for segmentation. Start with a small set of high-signal events, validate stitching, then build Journeys with tight exit logic so you don’t annoy recent buyers.
Implement Track Events with Propel
When teams tighten SDK tracking, the biggest lift is usually not the code—it’s agreeing on identity rules, event/property standards, and how those map to real revenue flows in Customer.io. If you want help pressure-testing your event plan against cart recovery, replenishment, and winback orchestration, book a strategy call and we’ll walk through what to track, where it tends to break, and how to QA it before you scale sends.