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 app-side behavior to drive cart recovery, replenishment, and winback. If you want a second set of eyes on your tracking plan before you ship (or to debug why journeys “randomly” miss people), book a strategy call and we’ll pressure-test the data flow like an operator would.
At a practical level, the SDK is your source of truth for who did what and when inside your app (and sometimes your mobile webview). Get the install + identify + event schema right, and your retention automations become predictable. Get them wrong, and you’ll see classic issues: abandoned cart journeys that never fire, push audiences that are too small, and “reactivation” campaigns targeting people who bought yesterday.
How It Works
The SDK sends three categories of data into Customer.io: device context, person identity, and behavioral events. In retention programs, the hard part isn’t sending data—it’s making sure anonymous activity stitches to the right person at login/checkout, and that your events are consistent enough to segment and orchestrate across email/push/SMS.
- Install the SDK to collect app context. The SDK captures device/app metadata (platform, version, push token where applicable). This is what makes mobile push targeting possible and keeps “send to device” reliable.
- Identify the person as soon as you can. Before login, you may only have anonymous activity. The moment you have a stable identifier (account created, login, or verified email/phone), call
identifyso Customer.io can tie future events and attributes to a real profile. - Track events for retention triggers. Events like
product_viewed,added_to_cart,checkout_started,purchase_completedare what power cart recovery, browse abandonment, replenishment, and post-purchase cross-sell. - Stitch anonymous-to-known behavior. In practice, this is where most programs break. If a user browses and adds to cart while anonymous, then logs in, you need the SDK flow to merge that pre-login activity onto the identified profile—otherwise your “abandoned cart” journey targets nobody (or targets the wrong profile).
- Customer.io uses the incoming stream to build segments and trigger journeys. Segments evaluate people based on attributes + event history; Journeys trigger off events and then branch on conditions (e.g., “purchased within 4 hours?” “has push token?”).
Step-by-Step Setup
Don’t start by tracking everything. Start by mapping the retention outcomes you care about (cart recovery, second purchase, winback), then implement the smallest event + identity set that makes those automations accurate. Once that’s stable, expand the schema.
- Pick your primary identifier strategy.
- Decide whether your canonical ID is
customer_id(recommended) and treat email/phone as attributes that can change. - Document how you’ll handle guest checkout vs account users.
- Decide whether your canonical ID is
- Install the Customer.io SDK in your app.
- Implement the SDK for your platform (iOS/Android/React Native/Flutter, etc.).
- Confirm the app can send events in production builds (not just debug).
- Implement
identifyat the right moments.- Call
identifyon: account creation, login, and after a guest checkout when you receive a durable identifier. - Send core attributes with identify:
email,phone(if used),first_name,accepts_marketing,country,timezone.
- Call
- Track the retention-critical events with consistent properties.
product_viewed:product_id,variant_id,price,categoryadded_to_cart:cart_id,product_id,variant_id,quantity,pricecheckout_started:cart_id,cart_value,item_countpurchase_completed:order_id,order_value,currency,items(array),discount_codes
- Handle anonymous activity and merging explicitly.
- Track pre-login events (browse/cart) under an anonymous profile/device.
- When the user identifies, ensure the SDK flow merges the anonymous profile into the identified person so cart/browse history carries over.
- Validate data in Customer.io before building journeys.
- Spot-check a handful of real devices: confirm identify happened, events arrived, and properties look right.
- Confirm push tokens are attached to the same profile that receives events.
When Should You Use This Feature
SDK-based tracking is the right move when your retention strategy depends on in-app behavior and timing precision. If you’re only sending post-purchase email from Shopify, you can get by without it—but you’ll hit a ceiling fast once you add push, browse abandonment, or personalized replenishment.
- Cart recovery that actually matches what’s in the cart. Example: a shopper adds two SKUs in-app, gets distracted, and closes the app. With SDK events + cart_id, you can trigger a push within 30 minutes and an email a few hours later, and suppress both if
purchase_completedfires. - Browse abandonment and product discovery loops. Track
product_viewedand build “viewed X but didn’t add to cart” segments for a tight 24-hour window. - Second purchase acceleration. Use
purchase_completed+ item metadata to send cross-sell or education based on what they actually bought, not just what’s in your catalog. - Reactivation with real intent signals. “No sessions in 30 days” is more reliable when it’s app-derived, not inferred from email opens.
- Push-first orchestration. If push is a meaningful revenue channel for you, SDK identity + device management is non-negotiable.
Operational Considerations
Once the SDK is live, the work shifts from “sending data” to “keeping data trustworthy.” Most retention issues show up as segmentation drift (wrong people qualify), broken orchestration (messages don’t suppress), or identity fragmentation (duplicate profiles).
- Segmentation depends on stable event naming. If one team sends
add_to_cartand another sendsadded_to_cart, you’ll build segments that silently miss revenue. Lock a schema and treat changes like API changes. - Data flow latency impacts holdouts and suppression. If
purchase_completedarrives late, your cart recovery will hit buyers. Build small “grace periods” (wait 15–30 minutes, then check for purchase) instead of firing instantly. - Identity stitching is the difference between scale and chaos. In most retention programs, we’ve seen anonymous-to-known merging get skipped during “MVP” and never fixed—leading to inflated audience counts, broken frequency caps, and messy attribution.
- Orchestration across channels needs a single source of truth. Decide whether Customer.io is the system that determines eligibility (recommended), or whether you’re also gating sends in your app/backend. Split-brain logic creates hard-to-debug gaps.
- Versioning and QA matter. App releases can change event payloads. Add lightweight monitoring (sample events per day, property presence) so you catch breaks before revenue drops.
Implementation Checklist
If you want this to hold up under real traffic, treat this like a tracking product—not a one-off integration. The checklist below is what we use to get to “reliable enough to automate revenue.”
- SDK installed in production builds (not just staging)
- Primary identifier chosen (customer_id vs email) and documented
identifycalled on login/account creation/guest checkout resolution- Anonymous pre-login events tracked and merged into identified profile
- Core retention events implemented: product_viewed, added_to_cart, checkout_started, purchase_completed
- Event properties standardized (IDs, values, currency, item arrays)
- Push token captured and attached to the correct person profile
- Suppression logic validated: purchase cancels cart/browse journeys
- Basic monitoring in place (event volume, missing properties, duplicates)
Expert Implementation Tips
The difference between “we have events” and “retention prints money” usually comes down to a few unsexy details: IDs, timing, and consistency.
- Always send IDs, not just names. Product titles change;
product_id/variant_iddon’t. Your segments and dynamic content will survive merchandising changes. - Use a consistent cart identifier. If
cart_idchanges every time the user opens the cart screen, your abandoned cart logic will splinter. Keep it stable per cart session. - Build “purchase” as the universal suppressor. In practice, every journey (browse, cart, price drop) should check
purchase_completedbefore sending the next step. - Capture timezone early. If you wait until checkout to set timezone, your push/email time windows will be off for new users—especially for browse abandonment.
- Plan for logged-out usage. Many D2C apps get meaningful browsing from logged-out users. Make sure your anonymous tracking is intentional and merge-ready.
Common Mistakes to Avoid
Most teams don’t fail because they didn’t track enough—they fail because the data is inconsistent or the identity graph fractures. These are the patterns that repeatedly cause “why didn’t the journey fire?” incidents.
- Calling
identifytoo late. If you only identify at purchase, you can’t reliably recover carts for logged-in users who abandon before checkout. - Using email as the ID when emails change. This creates duplicate profiles and breaks lifetime value tracking. Store email as an attribute; keep a stable internal ID as the identifier.
- Event property drift across platforms. Android sends
price_cents, iOS sendsprice. Your segments will be wrong and personalization will break. - No merge strategy for anonymous activity. You’ll see “abandoned cart” audiences that look tiny even though analytics says abandonment is high.
- Instant triggers without a grace period. You’ll message people who complete checkout seconds later, especially on slow networks or with delayed purchase events.
Summary
If you’re using the SDK, the job is simple: identify early, track a tight set of events with clean properties, and make sure anonymous behavior stitches to the right person. When that’s true, cart recovery and repeat purchase automations become predictable—and scaling channels like push stops being a guessing game.
Implement How It Works with Propel
If you already run on Customer.io, the fastest wins usually come from tightening identity stitching and trimming event chaos before you add more journeys. If you want an operator-level review of your SDK calls, event schema, and suppression logic (especially for cart recovery and post-purchase flows), book a strategy call and we’ll map what to fix first so your automations hit the right people at the right time.