Track Events with the Customer.io SDK (Retention-Ready Setup)

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 Customer.io to drive real retention outcomes (not just send messages), your SDK event tracking has to be clean: consistent names, stitched identities, and payloads built for segmentation. If you want a second set of eyes on your tracking plan before you ship it, book a strategy call—most retention programs don’t fail in the workflow builder, they fail upstream in the event layer.

In D2C, “track events” is where you earn your leverage. The difference between a cart recovery flow that prints money and one that spams loyal customers usually comes down to whether you’re tracking what happened (event), who did it (identity), and what’s inside the action (properties like SKU, category, value, and cart contents).

How It Works

Customer.io’s SDKs send behavioral events from your app (mobile or web) into Customer.io, where you can use them to trigger campaigns, build segments, and personalize messages. In practice, the mechanics that matter are (1) when you identify a user, (2) how you handle anonymous activity, and (3) how you structure event properties so they’re actually usable for retention.

  • Identity first, then behavior. Your app sends events tied to an identifier. If the user is anonymous, events can be captured under an anonymous profile and later merged when the user identifies (login/signup). This stitching is what prevents “cart abandoned” from firing to the wrong profile or duplicating sends.
  • Events are the trigger layer. Events like Viewed Product, Added to Cart, Started Checkout, and Order Completed become entry conditions and branching logic for recovery and repeat purchase programs.
  • Properties are where segmentation comes from. The event name gets you into a workflow; properties help you decide what to do next (e.g., exclude discounted items, route VIPs, personalize product blocks, suppress if out of stock).
  • Device + person context matters for orchestration. SDKs can associate devices (push tokens) and in-app eligibility with the same person profile. If identity stitching is messy, push/in-app targeting breaks in subtle ways (wrong device, wrong user, duplicated devices).

Step-by-Step Setup

The goal here isn’t “send events.” The goal is “send events you can trust for revenue workflows.” Treat this like instrumentation for a payment system: define the contract, implement consistently, then validate with real user journeys.

  1. Install the Customer.io SDK for your platform.
    Add the SDK to your iOS/Android/Web app per your platform’s setup. Do this early so you can validate event delivery in a staging environment before you wire up production campaigns.
  2. Decide your identity strategy (non-negotiable).
    Pick the primary identifier you’ll use in Customer.io (usually your internal customer_id). If you also have email/phone, decide whether you’ll store them as attributes and when they become available. The operational goal: one human = one profile.
  3. Implement identify at the right moments.
    Call identify immediately after a user logs in or completes signup. If you support guest checkout or pre-login browsing, keep events anonymous until you can confidently stitch them, then identify and merge.
    • Good moments: login success, signup completion, account creation, post-purchase account creation.
    • Risky moments: “email entered” fields (high typo rate), SMS opt-in screens (shared numbers), partial forms.
  4. Track a tight set of retention-critical events.
    Start with the events that power repeat purchase and recovery. Keep names stable and human-readable.
    • Viewed Product (include sku, product_id, category, price)
    • Added to Cart (include cart_id, items array, cart_value)
    • Started Checkout (include cart_id, checkout_value)
    • Order Completed (include order_id, revenue, items, discount_code, is_subscription)
  5. Standardize your payload schema.
    Most retention teams regret “freeform properties.” Use consistent keys and types. Example: always send price as a number, not a string; always use sku not sometimes SKU.
  6. Validate in Customer.io with real journeys.
    Run through a realistic flow on a test device: browse product → add to cart → close app → reopen → checkout → purchase. Confirm:
    • Events arrive in the right order
    • Anonymous events merge into the identified profile
    • Properties are present and queryable for segments
  7. Only then, wire campaigns to events.
    Build triggers and segments after you’ve confirmed event consistency. In most retention programs, the fastest way to create “ghost bugs” is building workflows while instrumentation is still changing.

When Should You Use This Feature

SDK event tracking is the right move whenever your retention program depends on what a customer did inside your app—especially when timing and personalization matter. If you’re still relying on pageviews or order webhooks alone, you’ll miss the intent signals that make recovery and repeat purchase work.

  • Cart recovery with product-level relevance. Trigger abandonment sequences off Added to Cart or Started Checkout, and personalize with the actual items. This is where properties like items, category, and cart_value pay off.
  • Browse-to-buy nudges for high-intent shoppers. If someone hits Viewed Product 3+ times in 24 hours but never adds to cart, you can nudge with social proof, UGC, or a “still thinking about it?” message—without discounting.
  • Repeat purchase timing based on consumption. For replenishable products, track Order Completed with SKU and quantity so you can time replenishment reminders and cross-sells by what they actually bought.
  • Reactivation based on last meaningful action. “Last opened the app” is weak. “Last viewed product category” or “last added to cart” gives you a hook to bring them back with relevant inventory.

Realistic scenario: A skincare brand sees a ton of mobile traffic. Shoppers add a cleanser + moisturizer bundle, then drop. With SDK tracking, you trigger a 45-minute push reminder using the exact bundle items, suppress it if Order Completed fires, and route VIPs (high LTV segment) to a no-discount message while first-timers get free shipping.

Operational Considerations

Once you start using events for revenue workflows, the operational constraints show up fast: identity collisions, inconsistent payloads, and orchestration conflicts across channels. Planning for these upfront saves you months of “why is this segment wrong?” debugging.

  • Segmentation depends on stable naming. If your app ships AddedToCart on Android and Added to Cart on iOS, your segments will silently undercount. Lock event names and property keys in a shared tracking spec.
  • Identity stitching is where most programs break. If you identify users too early (before you’re confident it’s the right person), you’ll merge unrelated behavior and send recovery messages to the wrong customer. If you identify too late, you’ll lose cart/browse history and personalization.
  • Event timing affects orchestration. Mobile apps can batch or delay events (backgrounded app, poor connection). Build workflows with short “grace” delays and strong exit conditions (e.g., exit on Order Completed) so you don’t message after purchase.
  • Source-of-truth alignment. For revenue and subscription status, many teams treat backend/order system events as canonical, and app events as intent signals. That split tends to reduce false positives (e.g., “purchase complete” should come from backend when possible).
  • Cross-channel collision control. If push, email, and SMS all trigger off the same event, you need frequency rules and channel prioritization—otherwise you’ll triple-tap customers and hurt LTV.

Implementation Checklist

If you want your retention workflows to be dependable, treat this checklist like a launch gate. Most teams can “get events in,” but the winners make the data usable across segmentation, personalization, and suppression.

  • SDK installed and verified in staging + production
  • Clear primary identifier chosen (e.g., customer_id) and used consistently in identify
  • Anonymous pre-login events supported (and merge behavior verified)
  • Core retention events implemented: Viewed Product, Added to Cart, Started Checkout, Order Completed
  • Event property schema standardized (keys, types, required fields)
  • Cart and order payloads include an items array with SKU/product identifiers
  • Test journey completed end-to-end and validated in Customer.io activity logs
  • Suppression/exit events defined (especially Order Completed)
  • Frequency and channel priority rules drafted before turning on multi-channel sends

Expert Implementation Tips

These are the moves that usually separate “we have tracking” from “our tracking drives money.” They’re small decisions, but they compound when you start segmenting and iterating.

  • Version your tracking spec like code. Keep a simple doc (or JSON schema) that defines event names and required properties. When Product changes the cart model, your retention triggers shouldn’t quietly degrade.
  • Send both IDs and human labels. Include product_id/sku for joins and product_name for fast message personalization. You’ll thank yourself when debugging segments.
  • Prefer “state change” events over “button click” events. Track Added to Cart when the cart actually updates, not when someone taps a button that might fail due to network or inventory.
  • Build cart recovery off a cart ID. If your app supports cart edits, a cart_id plus an items array makes it much easier to keep messaging aligned with the current cart state.
  • Use a short hold before the first abandonment touch. A 30–90 minute delay catches a lot of “I just got distracted” cases and reduces the number of customers who get a reminder after they already purchased on another device.

Common Mistakes to Avoid

Most tracking mistakes don’t show up as errors—they show up as revenue leakage and customer fatigue. These are the ones we see repeatedly when D2C teams wire Customer.io to app events.

  • Identifying users with unstable identifiers. Using email before verification or using device IDs as the primary key leads to duplicate profiles and broken suppression.
  • Inconsistent event naming across platforms. iOS and Android teams shipping different names is the fastest way to create segments that “kind of work” but never scale.
  • Missing required properties for personalization. Triggering Added to Cart without item details forces generic recovery messages, which usually underperform and push you toward unnecessary discounting.
  • No exit conditions for purchase. If your abandonment flow doesn’t exit on Order Completed, you will inevitably message customers after they buy—especially with delayed mobile event delivery.
  • Over-tracking noisy events. Tracking every scroll and tap clutters your data index and makes it harder to find the events that matter for retention decisions.

Summary

If you want Customer.io to drive retention, your SDK events need to be identity-safe, consistent, and built for segmentation. Start with a small set of revenue-critical events, standardize properties, and validate stitching before you build workflows. Once the event layer is solid, cart recovery and repeat purchase automations get dramatically easier to scale.

Implement Track Events with Propel

If you’re rolling out SDK tracking and you want it to hold up once you layer on multi-channel orchestration, it helps to pressure-test the identity plan, event schema, and suppression logic before you ship. That’s the kind of work we typically do alongside teams running Customer.io—and if you want to sanity-check your tracking spec against real retention use cases (cart recovery, replenishment, reactivation), you can book a strategy call.

The goal isn’t more events. It’s fewer, cleaner events that you can confidently use to trigger messages, personalize content, and avoid over-messaging your best customers.

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