Summarize this documentation using AI
Overview
If you want Customer.io to drive revenue (not just send messages), your SDK event tracking has to be clean enough to support segmentation, identity stitching, and real-time triggers. If you’re unsure whether your current app instrumentation is “good enough” for cart recovery and repeat purchase flows, book a strategy call and we’ll pressure-test your event plan against actual retention use cases.
In most retention programs, the difference between a 3% and a 12% recovery flow isn’t copy—it’s whether the app is emitting the right events with the right identifiers at the right time.
How It Works
Customer.io’s SDK tracking is straightforward on paper: you identify a person, then you send events. Operationally, the hard part is making sure anonymous behavior (pre-login browsing, add-to-cart, product views) reliably stitches to the known profile once the customer logs in or enters email/SMS.
- Identity first: the SDK needs a stable identifier (typically your internal
customer_id) and, when available, traits like email/phone. That’s what Customer.io uses to attach events to the right person. - Anonymous-to-known stitching: you’ll often start with anonymous activity (app opens, product views). Once the user authenticates or submits email, you call
identifyso future events land on the known profile—and you should ensure earlier anonymous events aren’t stranded. - Event payloads become segmentation fuel: every property you send (SKU, category, cart value, currency, quantity, variant, discount) is what you’ll later filter on to target high-intent audiences and suppress low-quality sends.
- Real-time triggers: once the SDK sends an event, Customer.io can trigger Journeys immediately (browse abandon, cart abandon, replenishment nudges) without waiting for nightly syncs.
Real D2C scenario: a shopper adds a “Hydrating Serum” to cart in your mobile app while browsing anonymously, then creates an account at checkout. If you only track Add to Cart after login (or you fail to stitch identities), your cart recovery flow won’t fire—or worse, it fires without the product context needed to personalize the message.
Step-by-Step Setup
Before you touch code, align on what “done” means: you want a known user profile, a consistent event taxonomy, and payloads that match the segments you plan to build. Then implement the SDK in a way that minimizes identity drift.
- Install the Customer.io SDK in your app
Add the appropriate SDK for your platform (iOS/Android/React Native/Flutter/Web) and verify you can initialize it in your app lifecycle. Treat initialization as production-critical—if it’s behind a feature flag that never ships, your retention program won’t have data. - Decide your primary identifier (do this before calling identify)
Use a stable internal ID (e.g.,customer_id) rather than email as the primary key. Emails change; internal IDs don’t. This reduces duplicate profiles and makes merges less painful. - Call
identifyat the right moment
Triggeridentifyimmediately after the user logs in, registers, or submits email/phone—basically the moment you can confidently tie behavior to a person. Include traits you’ll segment on (email, phone, locale, acquisition source, loyalty tier). - Track high-signal events (and skip vanity events)
Start with events that directly map to retention money flows:Product Viewed(includesku,category,price)Added to Cart(includesku,quantity,cart_value)Checkout Started(includecart_value,items)Order Completed(includeorder_id,revenue,items,discount_code)
- Validate events in Customer.io before building Journeys
Send test events from a dev build, confirm they land on the expected person profile, and verify properties are typed correctly (numbers as numbers, timestamps as timestamps). This is where most “why didn’t the campaign trigger?” issues are born. - Implement identity stitching checks
Test the full path: anonymous browse → add to cart → login → event triggers. Confirm the known profile contains the cart event history you expect. If it doesn’t, fix stitching before you ship automations.
When Should You Use This Feature
SDK event tracking is the retention foundation any time behavior happens in-app and you need immediate, behavior-based messaging. If you’re relying on server-side order data alone, you’ll miss the intent signals that drive recovery and repeat purchase.
- Cart recovery in mobile apps: trigger a push/email sequence off
Added to CartorCheckout Started, with product-level personalization pulled from event properties. - Browse abandonment: if a user views 3+ PDPs in a category but doesn’t add to cart, you can follow up with a curated set—only works if
Product Viewedis tracked with category/SKU. - Reactivation based on declining engagement: segment users who haven’t fired
App OpenedorProduct Viewedin 30 days, then tailor offers based on last category viewed. - Repeat purchase and replenishment: use
Order Completeditem data to time replenishment nudges and cross-sells (e.g., 21 days after buying moisturizer, recommend cleanser).
Operational Considerations
Once you start running real retention programs, event tracking problems show up as segmentation gaps, duplicate profiles, and noisy triggers. Plan for those realities upfront so you’re not debugging revenue flows during a promo weekend.
- Segmentation depends on payload discipline: if one platform sends
categoryand another sendsproduct_category, your segments will silently undercount. Lock your naming conventions and enforce them. - Data flow timing matters: cart recovery works best when events arrive in near real time. If your app queues events aggressively or drops them in low-connectivity states, you’ll see delayed triggers and lower conversion.
- Orchestration across channels: decide how SDK events interact with server-side purchase events (Shopify/Stripe). In practice, double-sending
Order Completedfrom both app and backend creates duplicate conversions and broken “exit on purchase” logic. - Identity stitching is a retention lever: if you’re running heavy pre-login browsing (common in skincare, fashion, supplements), prioritize getting email/phone early (wishlist, save cart) so your events attach to a reachable profile.
- Event volume vs. usefulness: sending every tap generates cost and confusion. Keep the event set tight and revenue-oriented, then expand once your core flows perform.
Implementation Checklist
Use this as a pre-flight check before you build automations on top of SDK events. If you can’t confidently check these off, your Journeys will be fragile.
- SDK installed and initialized in all production app entry points
- Primary identifier chosen (stable internal ID) and used consistently
identifycalled immediately after login/registration/email capture- Anonymous-to-known stitching tested end-to-end (pre-login events attach correctly)
- Core events implemented:
Product Viewed,Added to Cart,Checkout Started,Order Completed - Event properties standardized (SKU, category, price, quantity, cart_value, currency)
- Events validated in Customer.io person profiles and activity logs
- Deduplication plan for purchase events (SDK vs backend source of truth)
Expert Implementation Tips
The teams that win with Customer.io aren’t the ones tracking the most events—they’re the ones tracking the right events consistently across platforms and tying them cleanly to identity.
- Design events around segments you actually want: if you want “high-intent cart abandoners with cart value > $75,” make sure
cart_valueis always present and numeric. - Include an
itemsarray on cart/checkout/purchase: product-level personalization (and post-purchase cross-sell) gets dramatically easier when you can loop over items in Liquid. - Track “remove from cart” if your catalog has long consideration cycles: in apparel, people edit carts a lot. Without removals, you’ll recommend the wrong SKU and hurt conversion.
- Use a single event name per concept: don’t split into
AddToCart,Added To Cart, andadd_to_cartacross teams. Pick one and enforce it. - Instrument “email captured” separately from “account created”: for many D2C apps, email capture happens before full registration. That’s your earliest moment to stitch anonymous intent to a reachable identity.
Common Mistakes to Avoid
Most tracking failures aren’t technical—they’re coordination failures between product, engineering, and retention. These are the ones that repeatedly break cart recovery and reactivation programs.
- Using email as the primary ID: leads to duplicate profiles when emails change or when users use Apple Private Relay.
- Calling
identifytoo late: if you only identify after purchase, you lose pre-purchase intent events that power recovery and discovery flows. - Missing required properties: a cart abandon event without SKU/category/cart value forces generic messaging and kills performance.
- Double-tracking purchases: sending
Order Completedfrom both SDK and backend inflates metrics and breaks exit conditions. - Inconsistent naming across platforms: iOS tracks
Product Viewed, Android tracksViewed Product—your segments quietly exclude half your users. - Not testing the anonymous journey: teams test only logged-in flows, then wonder why cart recovery underperforms for new users.
Summary
If your SDK events are accurate and identities stitch cleanly, Customer.io becomes a real-time retention engine for cart recovery, repeat purchase, and reactivation. If they’re messy, you’ll spend your time debugging segments instead of scaling flows.
Prioritize identity, standardize event names/properties, and validate end-to-end before you build Journeys on top.
Implement Track Events with Propel
If you’re building on Customer.io and want your SDK tracking to hold up under real retention pressure (cart recovery, browse abandon, post-purchase cross-sell), it helps to treat the event plan like revenue infrastructure—not an analytics afterthought. If you want a second set of operator eyes on your identity stitching and event taxonomy, book a strategy call and we’ll map the minimum viable tracking spec to the flows you actually want to run.