Track Events with the Customer.io SDK (for Retention Marketing)

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 automations that actually fire at the right time, event tracking has to be clean at the app layer—not guessed from pageviews or loosely mapped analytics. Customer.io becomes dramatically more reliable once your SDK is sending consistent events tied to a stable customer identity; if you want a second set of eyes on your tracking plan before you ship, you can book a strategy call.

In most retention programs, the difference between “nice flows” and “revenue flows” is whether events like Added to Cart, Started Checkout, Purchased, and Viewed Product are tracked with the right identifiers, timestamps, and properties.

How It Works

At a practical level, the SDK does two jobs: it ties app activity to a person (identity stitching), and it streams the events you care about into Customer.io so Journeys can trigger, branch, and personalize messages.

  • Install the SDK in your app (iOS/Android/React Native/Flutter/web). This establishes a direct pipeline from the client to Customer.io.
  • Identify the user as soon as you can do it confidently (typically at login/account creation). This is where most teams either win (stable IDs) or quietly lose (duplicate profiles).
  • Track events at the moment they happen in the app (button tap, screen confirmation, checkout success). Each event should include properties that make segmentation and message content easy.
  • Customer.io stores events on the person profile, which you then use to trigger Journeys (e.g., “Started Checkout but no Purchase within 2 hours”).

Where this tends to break in practice is when the app sends events before a user is identified, or when you identify with an email one day and an internal user ID the next. Retention flows don’t fail loudly—they just underperform.

Step-by-Step Setup

Before you write code, align internally on the exact events that power your highest-value retention plays (cart recovery, browse recovery, replenishment, winback). Then implement the SDK so those events are consistently tied to the same person.

  1. Pick your identity strategy first.
    Use a stable internal customer_id (recommended) and store email/phone as attributes. Avoid using mutable identifiers (like email) as your primary ID if customers can change it.
  2. Install the correct Customer.io SDK for your platform.
    Do this in the app project (not just your website) so you can capture true behavioral signals like “checkout completed” or “push opened.”
  3. Initialize the SDK on app launch.
    Make sure it runs early enough to capture first-session behavior, but don’t rush into identifying until you have a real user ID.
  4. Call identify immediately after login/signup.
    Send your stable ID and set baseline attributes you’ll segment on (email, phone, first_order_date, acquisition_source, etc.).
  5. Track your retention-critical events with properties.
    Start with a tight set:
    • Product Viewed (product_id, sku, category, price)
    • Added to Cart (cart_id, product_id, quantity, value)
    • Started Checkout (cart_id, value, items_count)
    • Purchased (order_id, value, currency, items, coupon, shipping_method)
  6. Handle anonymous-to-known stitching intentionally.
    If you allow guest browsing, decide whether you’ll track anonymous events and merge them after signup/login. If you skip this, your browse/cart recovery audiences will be smaller than you expect.
  7. Validate in Customer.io activity logs.
    Confirm: (1) events arrive, (2) they attach to the correct person, (3) properties are present and typed consistently.

When Should You Use This Feature

Event tracking is worth the engineering time when you’re trying to trigger messages off real intent—not just “visited a page.” The more your product has consideration or repeat cycles, the more leverage you get from clean app events.

  • Cart recovery that doesn’t guess.
    If your app can confirm Started Checkout and Purchased, you can suppress instantly after purchase and avoid the classic “you left something behind” message to someone who already converted.
  • Browse-to-cart nudges based on real product interest.
    Track Product Viewed with category/price and trigger a 4–8 hour follow-up featuring the exact SKU or a tight collection.
  • Repeat purchase and replenishment.
    A clean Purchased event with item-level data lets you build segments like “bought 30-day supply” and message at day 21–28.
  • Reactivation based on meaningful inactivity.
    Use “last meaningful event” (not last app open) to define lapsed users—e.g., no Product Viewed or Added to Cart in 45 days.

Real scenario: A skincare brand sees lots of mobile traffic but weak cart recovery. After instrumenting Added to Cart and Purchased in the app SDK (with cart_id and order_id), they run a Journey: “Added to Cart → wait 45 minutes → if no Purchased → send push; wait 20 hours → if still no Purchased → send email with the exact items.” The win isn’t the message—it’s the suppression accuracy and item-level personalization.

Operational Considerations

Once events are flowing, the work shifts from “tracking” to “operating”—keeping your segments stable, your identity clean, and your orchestration free of race conditions.

  • Segmentation depends on naming discipline.
    Pick an event taxonomy and never drift. Added to Cart vs Add To Cart becomes two audiences and two broken reports.
  • Property consistency is what makes personalization scale.
    If value is sometimes a string and sometimes a number, you’ll eventually ship a broken conditional or mis-rank VIPs.
  • Identity stitching is the hidden CLV lever.
    In practice, duplicate profiles inflate audience counts, fragment purchase history, and cause over-messaging. Use a stable primary ID and treat email/phone as attributes.
  • Event timing affects suppression.
    If Purchased arrives late (or only server-side days later), your cart recovery flow will hit buyers. Make sure the app fires purchase confirmation immediately, even if you also send a server receipt event later.
  • Orchestration across channels needs a single source of truth.
    If push is triggered off app events but email is triggered off backend events, you’ll get weird sequencing. Align triggers where possible and use holds/waits to prevent double-taps.

Implementation Checklist

Before you call the tracking “done,” make sure the basics are locked so your retention flows don’t degrade over time as the app evolves.

  • SDK installed and initialized on app launch
  • identify called with a stable internal customer ID after login/signup
  • Baseline person attributes set (email, phone, timezone if available, marketing opt-in status)
  • Core retention events implemented: Product Viewed, Added to Cart, Started Checkout, Purchased
  • Event properties standardized (IDs, value, currency, category, quantity)
  • Anonymous-to-known plan decided (merge or ignore) and tested
  • Validated in Customer.io: events attach to the correct profile and appear in activity logs
  • Suppression logic tested: purchase reliably exits cart/checkout flows

Expert Implementation Tips

Most teams track “enough to start” and then wonder why performance plateaus. The extra lift comes from tracking the details that make segments precise and messages feel intentional.

  • Track IDs first, labels second.
    Always include product_id/sku and order_id. Names can change; IDs shouldn’t.
  • Include a cart_id and keep it stable through checkout.
    This makes it much easier to dedupe events and troubleshoot “why did they get two abandonment messages?”
  • Send item arrays on purchase when you can.
    Even if your first Journey only uses order value, you’ll want item-level data later for cross-sell and replenishment.
  • Define “meaningful activity” events for reactivation.
    App opens are noisy. Build lapsed segments off Product Viewed, Added to Cart, Purchased, or a custom Search Performed.
  • Build a QA Journey that pings Slack/email on bad payloads.
    When an event arrives missing product_id or with value = null, you want to know that day—not after a month of underperforming campaigns.

Common Mistakes to Avoid

These are the issues that quietly tank retention results while everything “looks connected.” Fixing them usually lifts revenue without changing a single subject line.

  • Identifying with email as the primary ID.
    Email changes, duplicates happen, and purchase history splits. Use a stable internal ID.
  • Tracking before identify without a merge plan.
    You’ll lose the highest-intent pre-login behavior (browse/cart) or attach it to orphan profiles.
  • Event name drift across platforms.
    iOS sends AddedToCart, Android sends Added to Cart. Now you’ve got two segments and partial audiences.
  • Missing suppression events.
    If Purchased isn’t reliable and fast, abandonment flows will hit buyers and spike unsubscribes.
  • Overstuffing payloads with unstable fields.
    Don’t rely on UI strings (like “Blue / Large”) without also sending structured IDs/options.

Summary

If you want cart recovery, repeat purchase, and winback to run cleanly, SDK event tracking has to be identity-safe and property-consistent.

Prioritize a stable identify call, a small set of high-leverage events, and fast purchase suppression—then build Journeys on top of signals you trust.

Implement Track Events with Propel

When teams implement Customer.io SDK tracking, the hard part usually isn’t sending events—it’s agreeing on identity rules, keeping payloads consistent, and making sure Journeys don’t break when the app changes. If you’re tightening up your event plan or debugging why audiences don’t match expectations in Customer.io, you can book a strategy call and we’ll pressure-test the tracking spec against the retention programs you’re trying to run.

That typically includes an event taxonomy for cart/browse/purchase, an identity stitching approach for anonymous sessions, and a quick QA loop so your recovery and repeat flows stay accurate as you ship new app releases.

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