Track events with Customer.io SDKs (mobile + web) to power retention

Customer.io partner logo

Table of Contents

Summarize this documentation using AI

This banner was added using fs-inject

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Overview

If you want retention flows to behave like a revenue system (not a guess), you need clean, timely events flowing into Customer.io. If your team wants a second set of eyes on the tracking plan before you ship, you can book a strategy call and we’ll pressure-test identity stitching, event naming, and what actually drives repeat purchase.

In most D2C programs, event tracking is where performance is won or lost. The difference between a 6% and 14% cart recovery flow is often one missing field (currency, value, SKU) or an identify call firing too late.

How It Works

Customer.io SDK tracking is simple in concept: your app sends “who did what” in real time, and Customer.io uses that activity to trigger campaigns, build segments, and personalize messages. In practice, the mechanics that matter are identity (who is this person), timing (when did we know it), and payload quality (what exactly happened).

  • Install the SDK in your mobile app (iOS/Android/React Native/Flutter/etc.) and/or web app so events are captured at the source of truth—user behavior.
  • Identify users as soon as you can confidently tie activity to a real customer (login, account creation, email capture, phone capture). This is what stitches anonymous browsing to a known profile.
  • Track events for high-intent actions (Viewed Product, Added to Cart, Started Checkout, Purchased) with enough metadata to segment and personalize.
  • Customer.io stores events + attributes and you use them to: trigger a cart recovery journey, suppress purchasers from reminders, and branch messaging based on category/SKU/value.

A realistic D2C scenario: someone browses your app anonymously, adds a moisturizer to cart, then creates an account at checkout. If identify() happens at account creation (not after purchase), the earlier Added to Cart event can stitch to the new profile and your recovery flow can fire correctly if they drop.

Step-by-Step Setup

Before you write a line of code, align your tracking plan to the retention outcomes you care about (cart recovery, replenishment, winback). Then implement in this order so identity stitching doesn’t break downstream automation.

  1. Choose your SDK surface area (mobile, web, or both).
    If you have both app and site, decide whether you’ll track in both and how you’ll unify identity (same internal customer ID, consistent email/phone normalization).
  2. Install the Customer.io SDK in the app.
    Follow the SDK-specific install steps for your stack (iOS/Android/React Native/Flutter). Keep the environment separation clean (dev/staging/prod) so you don’t pollute production with test events.
  3. Initialize the SDK early in the app lifecycle.
    Do this on app start so you don’t miss first-session events like product discovery and collection browsing.
  4. Implement identify() at the first reliable moment.
    Common triggers: account created, login success, email capture on lead form, SMS capture. Use a stable identifier (your internal customer ID) and attach key attributes (email, phone, acquisition source, customer status).
  5. Track your core retention events with consistent naming.
    At minimum for D2C retention:
    • Product Viewed (include SKU, product_id, category, price)
    • Added to Cart (include SKU(s), quantity, cart_id, value, currency)
    • Checkout Started (include cart_id, value, shipping method if known)
    • Order Completed / Purchased (include order_id, value, currency, items array, discount code)
  6. Handle anonymous-to-known stitching intentionally.
    If your app supports guest browsing, make sure anonymous events are captured and then merged when the user identifies. This is where cart recovery attribution usually breaks.
  7. Validate in Customer.io Activity Logs.
    Open a test profile and confirm: events arrive in order, payload fields are present, and the profile resolves to the right person after identify.
  8. Wire events into orchestration.
    Use events as triggers and filters in campaigns: trigger on Added to Cart, suppress if Purchased occurs, branch by category, and cap frequency to avoid hammering high-intent shoppers.

When Should You Use This Feature

SDK event tracking matters most when you need behavioral precision that your ecommerce platform can’t reliably provide—especially in mobile apps where “last seen” and web pixel logic won’t cut it. If you’re trying to move repeat rate or recover carts, you want these events coming from the app layer.

  • Cart recovery in app-heavy brands where users browse and build carts on mobile but convert later (or vice versa). SDK events let you trigger recovery based on actual cart actions, not pageviews.
  • Product discovery → conversion loops like “viewed a category 3+ times” or “viewed PDP but didn’t add to cart,” which are strong signals for browse abandonment and merchandising nudges.
  • Replenishment and repeat purchase when you can compute timing off purchase events and item-level metadata (e.g., 30 days after buying protein, 45 days after skincare starter kit).
  • Reactivation using app engagement events (App Opened, Session Started) combined with commerce events (last purchase date) to avoid sending winbacks to active users.

Operational Considerations

Most retention programs don’t fail because the SDK “didn’t send events.” They fail because the data model can’t support segmentation and orchestration at scale, or because identity is fragmented across devices and channels.

  • Segmentation depends on payload hygiene.
    If currency is missing on purchases, LTV segments get messy. If SKU/category fields are inconsistent, category-based cross-sell journeys become guesswork.
  • Identity stitching is the backbone.
    Pick a primary identifier (usually internal customer ID) and stick to it. Normalize email/phone consistently. If identify happens after checkout, your “abandoned checkout” audience will be undercounted and mis-targeted.
  • Event timing affects orchestration.
    If Purchased lands late (batching, offline queue), customers may get an “You left something behind” message after they already bought. Build suppression windows and sanity checks (e.g., wait 30–60 minutes, then confirm no purchase).
  • Cross-platform reality (web + app).
    If users browse on web and buy in app, you need consistent identifiers across both. Otherwise you’ll double-message or miss key suppressions.
  • Versioning and naming conventions.
    Treat event names as API contracts. Changing Added to Cart to AddToCart mid-quarter breaks triggers and reporting silently.

Implementation Checklist

Use this as a pre-launch gate before your team declares tracking “done.” It’s the stuff that prevents bad audiences and broken recovery flows later.

  • SDK installed and initialized in the correct app lifecycle point
  • identify() fires on login/account creation/email capture (not only after purchase)
  • Anonymous activity stitches to known profiles after identify
  • Core events implemented: Product Viewed, Added to Cart, Checkout Started, Purchased
  • Purchase event includes: order_id, value, currency, items (SKU/product_id/qty/price)
  • Cart/checkout events include: cart_id and value so you can dedupe and prioritize
  • Event naming conventions documented and locked
  • Validated in Customer.io Activity Logs on real devices (not just simulators)
  • Campaign suppressions tested (purchase suppresses cart recovery reliably)
  • Staging/dev data isolated from production workspace

Expert Implementation Tips

Once you have the basics, these are the operator moves that usually unlock better recovery and higher repeat rate without “more sends.”

  • Send item arrays, not just totals.
    Cart recovery performs better when you can render the exact items left behind and recommend complements from the same category.
  • Track “Removed from Cart” if your UX supports it.
    It helps you avoid sending recovery for carts that were intentionally cleared, and it improves your understanding of drop-off behavior.
  • Use a stable cart_id and order_id everywhere.
    This makes deduping straightforward and prevents multi-trigger spam when users add/remove items rapidly.
  • Implement a short delay before the first recovery touch.
    In practice, a 30–90 minute delay catches “I got distracted” abandoners while reducing false positives from slow payment flows.
  • Stitch identity before you ask for the sale.
    If you run a “save your cart” modal that captures email/SMS, fire identify() immediately so the cart event history attaches to the profile.

Common Mistakes to Avoid

These are the mistakes that create phantom lift in dashboards but don’t produce real incremental revenue—or worse, annoy customers who already converted.

  • Identifying too late.
    If you only identify on purchase, you can’t reliably recover carts or attribute browse behavior to a person.
  • Missing currency/value on commerce events.
    You lose the ability to prioritize high-value carts, build VIP segments, and measure revenue correctly.
  • Inconsistent event names across platforms.
    Web sends Added to Cart, app sends AddToCart—now you’re maintaining two automations or missing half the audience.
  • No dedupe strategy.
    Rapid add-to-cart actions can trigger multiple entries into the same journey unless you use cart_id, frequency controls, or entry conditions.
  • Not testing “purchase suppression” end-to-end.
    This is the classic: customer buys, then still gets the abandoned cart message because purchase arrived late or used a different identifier.

Summary

If retention is a priority, SDK event tracking is non-negotiable: it’s how you trigger the right message, to the right person, at the right time.

Get identity stitching right first, then focus on a small set of high-signal commerce events with clean payloads. Everything else in Customer.io gets easier after that.

Implement Track Events with Propel

If you’re rolling out SDK tracking and want it to hold up under real retention pressure (multi-device, guest carts, delayed purchase events), it helps to validate the plan before it’s baked into your app release cycle. We work with teams implementing Customer.io to map events to the actual automations you’ll run—cart recovery, replenishment, winback—and to make sure identity stitching doesn’t break when customers move between web and app.

If that’s useful, book a strategy call and we’ll review your identify points, event schema, and the suppressions that keep journeys from misfiring.

Contact us

Get in touch

Our friendly team is always here to chat.

Here’s what we’ll dig into:

Where your lifecycle flows are underperforming and the revenue you’re missing

How AI-driven personalisation can move the needle on retention and LTV

Quick wins your team can action this quarter

Whether Propel AI is the right fit for your brand, stage, and stack