Summarize this documentation using AI
Overview
If you want Customer.io to drive real retention outcomes (cart recovery, repeat purchase, winback), your SDK event tracking has to be boringly reliable—especially around identity and timing. If your team is wrestling with “why didn’t they enter the abandon flow?” or “why did they get the winback after buying?”, it’s almost always an event/identity issue, not a messaging issue. If you want a second set of eyes on your tracking plan, book a strategy call and we’ll pressure-test it like an operator would.
At a practical level, tracking events means your app sends Customer.io a stream of behaviors (viewed product, added to cart, started checkout, purchased) tied to a person. Those events become the triggers and filters that decide who gets what message, and when.
How It Works
In a retention program, events are the source of truth for intent. The SDK sends events from your mobile app (or web app) directly to Customer.io, and Customer.io uses them to: (1) trigger campaigns/journeys, (2) build segments, and (3) personalize messages with event properties.
- Install the SDK and initialize it early so you don’t miss first-session behaviors (product discovery and cart intent often happen before login).
- Track anonymous activity first (device-based) and then identify the user when you have a stable ID (login/account creation). This is where most programs win or lose data quality.
- Send events with a consistent schema (event name + properties). Properties are what make your retention messages feel “smart” (cart value, item names, category, discount eligibility), and what make segments accurate.
- Identity stitching matters: when a user starts anonymous, adds to cart, then logs in, you want that pre-login cart intent to attach to the known profile—otherwise your abandon flow fires to the wrong profile or doesn’t fire at all.
- Customer.io consumes events in near real time. In practice, this tends to break when you have duplicate events, late purchase events, or inconsistent IDs across app and backend.
Real D2C scenario: A shopper browses on iOS, adds two items to cart, then creates an account at checkout. If you track Added to Cart anonymously but never stitch it to the identified profile, your cart abandonment journey won’t trigger (or it’ll trigger to an anonymous profile you can’t message). Clean identify + merge behavior is what turns that session into recovered revenue.
Step-by-Step Setup
The goal here is simple: capture the events that map to retention outcomes, tie them to the right person, and keep the schema stable so your journeys don’t rot over time.
- Install the correct Customer.io SDK for your app
Pick the SDK that matches your stack (native iOS/Android or React Native/Flutter/Expo). Initialize it as early as possible in app startup so first-session events aren’t lost. - Decide your identity strategy (before you ship)
Choose the user identifier you’ll use across systems (usually your internalcustomer_id). Avoid using email as the primary ID if it can change. - Send an
identifycall when the user becomes known
Trigger this on login/account creation. Include core attributes that power segmentation (email/phone where permitted, country, acquisition source, loyalty tier). - Track key commerce events with properties that matter
At minimum, instrument:Product Viewed(product_id, name, category, price)Added to Cart(cart_id, items[], quantity, value)Checkout Started(cart_id, value, items[])Purchased(order_id, value, currency, items[], discount_code)
Checkout StartedtoBegin Checkoutlater, you’ll silently break triggers and segments. - Handle anonymous-to-known stitching explicitly
Make sure anonymous activity is merged into the identified profile after login. This is the difference between “cart recovery works” and “cart recovery is a leaky bucket.” - Validate in Customer.io before building journeys
Use activity logs / person profiles to confirm:- Events arrive with the expected names and properties
- Identify happens once per login (not on every screen)
- Anonymous events appear under the known user after identification
- Only then: wire events into triggers and filters
Build your cart abandonment and post-purchase flows on top of validated events, not assumptions.
When Should You Use This Feature
SDK event tracking is worth the effort when you need behavioral precision—especially when timing and identity decide whether you make money or annoy customers.
- Cart recovery that actually suppresses buyers: trigger on
Checkout StartedorAdded to Cart, then suppress anyone who firesPurchasedwithin the next X minutes. - Browse-to-buy follow-ups: if someone views 3+ products in a category but doesn’t add to cart, you can send a category-specific nudge (push/in-app) while intent is still hot.
- Repeat purchase timing: trigger replenishment or “run-out” reminders off purchase events + product metadata (e.g., 21 days after buying supplements).
- Reactivation based on real inactivity: segment users who haven’t fired
Product ViewedorApp Openedin 30 days, and tailor winbacks based on last category viewed/purchased.
Operational Considerations
Most teams don’t fail because they missed an SDK method—they fail because the data doesn’t hold up once campaigns scale. Treat event tracking like production infrastructure for revenue.
- Segmentation depends on stable schemas: lock event names and property keys. Version changes should be additive (new properties), not destructive (renames/removals).
- Data flow realities: mobile events can arrive late or out of order (offline usage). Your orchestration should tolerate that—especially purchase suppression logic.
- Deduplication for purchases: if the app and backend both send
Purchased, you’ll double-trigger post-purchase and break AOV/LTV reporting. Pick one source of truth or include a dedupe key (order_id) and enforce “one purchase event per order.” - Identity stitching is not optional: if you can’t reliably merge anonymous sessions into known profiles, you’ll undercount intent and over-message known buyers.
- Orchestration with other systems: if you also track via a warehouse/CDP, decide which system owns which events. In most retention programs, we’ve seen the cleanest setup when backend owns purchase/order finality, while SDK owns behavioral intent (views, carts, checkout start).
Implementation Checklist
Before you ship journeys that touch revenue, make sure your tracking passes a basic operator QA. This prevents the classic “flow looks right but doesn’t fire” problem.
- SDK initialized at app start (not after login)
- Single, stable user ID strategy documented and used everywhere
identifyfires on login/account creation and does not spam on every app open- Anonymous events are visible and successfully stitched after identify
- Core events implemented: Product Viewed, Added to Cart, Checkout Started, Purchased
- Purchase events include
order_idand are deduped across sources - Event properties include what you need for personalization (items, value, category)
- Tested with real devices (offline mode + poor connectivity)
- Customer.io profile shows correct event timeline for at least 5 end-to-end test users
Expert Implementation Tips
These are the small decisions that keep your retention machine from degrading over time as the app and catalog evolve.
- Use “cart_id” everywhere cart-related: it makes suppression and troubleshooting dramatically easier (Added to Cart → Checkout Started → Purchased all tied together).
- Send items as a structured array (id, name, qty, price, category). Your future self will thank you when you want dynamic cart emails and category-based winbacks.
- Prefer backend-confirmed purchase for suppression: if you can, treat “purchase complete” as backend truth and use the SDK purchase event mainly for UX analytics. This reduces false positives from failed payments.
- Instrument “Removed from Cart” if your catalog has high consideration. It helps you avoid sending “you left this behind” when they actually cleaned their cart intentionally.
- Create a tracking QA journey: a private internal workflow that pings Slack/email when key test accounts fire events. It catches regressions after app releases.
Common Mistakes to Avoid
These are the issues that quietly tank performance and inflate unsubscribe rates.
- Triggering abandonment off the wrong event:
Product Viewedis not cart abandonment. Use it for browse follow-ups, not checkout recovery. - Renaming events mid-quarter: you’ll break triggers and segments without obvious errors. If you must change names, run both in parallel during a migration window.
- Duplicate purchase events: causes double post-purchase sends, wrong holdout results, and angry customers.
- Identify too late: if identify only happens after purchase, you lose the entire funnel’s intent signals for personalization and recovery.
- Not stitching anonymous activity: you’ll see “great traffic, weak flows” because the highest-intent actions happened pre-login and never attached to a messageable profile.
Summary
If you want Customer.io retention to perform, your SDK events need to be consistent, identity-safe, and rich enough to personalize. Nail identify + stitching, standardize your commerce events, and validate in profiles before you scale journeys.
Implement Track Events with Propel
If you’re already running Customer.io, the fastest path is usually mapping your retention use cases (abandon, post-purchase, winback) to a tight event schema, then QA’ing identity stitching end-to-end before you build more automation. If you want an operator to review your SDK tracking plan, suppression logic, and event/property design, book a strategy call and we’ll walk through what will actually hold up once campaigns are live.