Customer.io Quick Start Guide (SDK): Get Tracking Right Before You Automate 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’re standing up Customer.io for a D2C brand, the fastest way to unlock cart recovery and repeat purchase isn’t building journeys first—it’s getting SDK identity + event tracking correct so messages target the right person at the right time. If you want a second set of eyes on your tracking plan before you ship it (and avoid painful rework later), book a strategy call.

In most retention programs, we’ve seen “quick starts” go sideways because teams track the wrong events (or track them inconsistently across web + app), then wonder why segments don’t match and abandon-cart sends miss half the audience. This guide keeps the focus on app-side instrumentation: install the SDK, identify users cleanly, track the minimum viable commerce events, and stitch anonymous-to-known behavior so your automations behave.

How It Works

Customer.io’s SDK setup is basically three moving parts: (1) a device/session starts anonymous, (2) you attach that activity to a real customer when you know who they are, and (3) you send consistent events and attributes that Customer.io can segment and trigger off of.

  • Install the SDK and initialize early so you capture pre-login behavior (product views, add-to-cart) instead of only post-login actions.
  • Identify the person at the right moment (login, account creation, or email capture). This is what stitches anonymous browsing/cart activity to a known profile.
  • Track events with a stable naming + payload convention so segments and triggers don’t break across platforms (web vs iOS vs Android).
  • Update person attributes separately from events for things you want to segment on continuously (email, phone, country, VIP tier, last_order_at, total_orders).

Real D2C scenario: a shopper adds a moisturizer to cart on mobile web, then installs the app to “get faster checkout,” creates an account, and completes purchase. If you initialized the SDK early and call identify at account creation, you can stitch the earlier add-to-cart and product-view events to the same person—so your cart recovery flow doesn’t keep nagging them after they already purchased, and your post-purchase cross-sell can reference what they browsed.

Step-by-Step Setup

The goal here is to get a clean, testable tracking spine in place before you build any journeys. You’re optimizing for accuracy, identity stitching, and predictable segmentation—not “sending something quickly.”

  1. Create your Customer.io workspace
    • Decide your workspace naming and environments (at minimum: production; optionally staging if your release process is mature).
    • Lock down who can change tracking keys and who can publish campaigns—this prevents accidental breakage once you start orchestrating.
  2. Set up message channels (so your tracking maps to sending later)
    • Email: confirm your sending domain plan early, even if you won’t send on day one.
    • Push: ensure your app can register device tokens and you have a plan for permission prompts (timing matters for opt-in rate).
    • SMS (if applicable): decide what constitutes “subscribed” vs “transactional only” so you don’t pollute compliance states.
  3. Integrate the SDK (web and/or mobile)
    • Initialize the SDK at app start / on site load so anonymous events are captured.
    • Confirm events are flowing into Customer.io Activity logs before you do anything else.
    • If you have both web + app: align event names and payload fields across platforms now (this saves weeks later).
  4. Implement identity: anonymous → known
    • Call identify when you have a stable customer identifier (commonly: internal customer_id). Don’t rely on email as the only key if your system supports a true ID.
    • Attach core attributes at identify time (email, phone, first_name, marketing_opt_in flags, locale/timezone if known).
    • Make sure you’re not creating duplicates by identifying the same person with different IDs across platforms.
  5. Track the minimum viable commerce events
    • Product Viewed (product_id, name, category, price, currency)
    • Added to Cart (cart_id, product_id, qty, price, currency)
    • Checkout Started (cart_id, cart_value, item_count)
    • Order Completed (order_id, revenue, currency, items[], discount, shipping, payment_method)
    • Email/SMS Captured (source, form/location) if you collect before account creation
  6. Add people (only after identity is correct)
    • If you migrate an existing customer list, import people with the same identifier you’ll use in the SDK.
    • Backfill key attributes you’ll segment on (total_orders, last_order_at, LTV bucket, subscription_status).
  7. Create a “tracking QA” segment and validate end-to-end
    • Build a segment like: “Has performed Added to Cart in last 1 day” and confirm your test device/user appears.
    • Run a full test: anonymous browse → add to cart → identify → purchase, and confirm events stitch to one person.

When Should You Use This Feature

SDK-based tracking is the right move when you need high-fidelity behavior data from your site/app and you want Customer.io to trigger retention messaging off real customer actions—not batch sync guesses.

  • Cart recovery that doesn’t misfire: trigger off Checkout Started or Added to Cart and suppress immediately on Order Completed. This only works if events are timely and identity is stitched.
  • Repeat purchase timing: use Order Completed + SKU/category payloads to drive replenishment reminders (e.g., “30 days after serum purchase”) and category-specific cross-sells.
  • Browse-based product discovery: capture Product Viewed to build “viewed but didn’t add” segments for win-back or education sequences.
  • Reactivation that’s actually targeted: combine last_seen (app activity) with last_order_at to separate “inactive buyers” from “active browsers who haven’t converted.”

Operational Considerations

Once the SDK is live, the day-to-day reality is less about “did we send events” and more about whether your data stays consistent as the app/site evolves. Most breakage happens when product teams rename events, change payload shapes, or ship login changes that quietly create duplicate profiles.

  • Segmentation reliability
    • Pick a canonical event taxonomy and stick to it. Don’t let iOS call it add_to_cart while web calls it Added To Cart.
    • Standardize timestamp handling (UTC) and currency formatting so revenue-based segments don’t drift.
  • Data flow and latency
    • Cart recovery is sensitive to timing—if events arrive late, you’ll send “forgot something?” after they already bought.
    • Plan for offline/mobile edge cases where events queue and flush later. Add suppression logic in journeys based on purchase events, not assumptions.
  • Identity stitching and duplicates
    • Use a single durable identifier across web/app (ideally internal customer_id). If you must use email, make sure it’s normalized and stable.
    • Decide how you’ll handle guest checkout vs account creation. In practice, this tends to break when the same buyer checks out as guest on web and later creates an account in-app.
  • Orchestration realities
    • Don’t build “smart” journeys on day one. Start with 1–2 triggers (cart started, order completed) and expand once you trust your data.
    • Keep suppression and exit conditions simple and event-driven (purchase cancels cart flow, refund cancels upsell flow, etc.).

Implementation Checklist

If you run through this list before you launch any retention automation, you’ll avoid the common trap of debugging journeys when the real issue is tracking.

  • SDK initialized on app start / site load (captures anonymous behavior)
  • Identify call implemented at login/account creation (and tested)
  • Single canonical person identifier chosen and used everywhere
  • Core commerce events implemented with consistent names and payloads
  • Order Completed event includes order_id + revenue + items array
  • Key person attributes set (email, phone, opt-in flags, timezone/locale)
  • QA segment(s) created to validate event → segment membership
  • Test plan executed: anonymous → identify → purchase, verified as one profile

Expert Implementation Tips

The difference between “data is flowing” and “retention works” is usually a handful of operator choices that keep your system stable over time.

  • Make event payloads future-proof: always include stable IDs (product_id, variant_id, cart_id, order_id). Names change; IDs don’t.
  • Track intent, not just outcomes: Checkout Started is often a better cart-recovery trigger than Added to Cart for brands with lots of casual browsing.
  • Use attributes for state, events for actions: subscription_status, VIP tier, and total_orders belong as attributes; add_to_cart belongs as an event.
  • Build one “golden path” dashboard: a simple internal doc that lists event names + required fields. When engineers ship updates, they check against it.
  • Stitch before you personalize: product recommendations based on browse history only work if anonymous activity merges into the identified profile.

Common Mistakes to Avoid

These are the issues that cause the most wasted time in retention execution—because teams try to solve them in messaging when they’re actually instrumentation problems.

  • Identifying too late: if you only identify after purchase, your cart/browse events stay anonymous and your recovery flows underperform.
  • Multiple identifiers per person: using email on web and customer_id in-app often creates duplicates and split histories.
  • Inconsistent event naming across platforms: segments won’t match, triggers won’t fire, and you’ll end up duplicating logic.
  • Missing purchase suppression: cart recovery without a hard exit on Order Completed will annoy customers and inflate unsubscribes.
  • Overloading one event: stuffing every detail into a single “Event” instead of using a clean set of commerce events makes segmentation painful.
  • No QA loop: if you don’t validate in Activity logs and segments with real devices/users, you’ll ship broken automations confidently.

Summary

If your SDK identity and commerce events are clean, Customer.io becomes a reliable trigger engine for cart recovery, repeat purchase, and reactivation. If they’re messy, you’ll spend your time chasing ghosts in segments and journeys. Get the stitching and event spine right first, then automate.

Implement Quick Start Guide with Propel

If you’re already implementing the SDK and want to pressure-test your identity strategy (guest checkout, cross-device, duplicate prevention) and your event taxonomy before it hardens, it’s worth doing a quick review with someone who’s seen the failure modes. We work with D2C teams running Customer.io and can help you map tracking to the retention outcomes you actually care about—then validate it with a practical QA plan. If that’s useful, book a strategy call.

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