Implement Identify (SDK) for Accurate Retention Targeting in Customer.io

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 cart recovery, repeat purchase, and reactivation to work reliably, your identity layer has to be clean—otherwise you end up messaging the wrong profile or losing the pre-login behavior that actually tells you what to send. Customer identity in Customer.io starts with a disciplined Identify implementation inside your web and mobile SDKs, and if you want a second set of eyes on your stitching and event model, you can book a strategy call.

In most retention programs, Identify is the difference between “we sent an abandoned cart flow” and “we recovered revenue.” Without it, anonymous browsing and cart building never attaches to the customer who later logs in or checks out.

How It Works

At a mechanical level, Identify tells Customer.io: “this device/session belongs to this person.” The SDK keeps an anonymous identifier until you identify a known user (email, customer ID, etc.), then future events and attributes land on the known profile. The key operational win is stitching: you keep the anonymous activity (product views, add-to-cart, checkout started) and attach it to the customer once they authenticate or provide an email.

  • Anonymous phase: The SDK can start tracking events immediately (app_open, product_view, add_to_cart) tied to an anonymous profile/device.
  • Identify moment: When the user logs in, creates an account, or you otherwise capture a stable identifier, you call identify with that identifier and any baseline attributes you care about (email, phone, first_name, marketing_opt_in, etc.).
  • Stitching behavior: Customer.io associates subsequent activity with the identified person, and (when implemented correctly) you preserve the pre-identify activity for segmentation and triggering.
  • Attributes vs events: Use Identify to set durable person attributes (like customer_tier, last_order_at if you maintain it app-side, sms_opt_in). Use events for behaviors that trigger retention (add_to_cart, checkout_started, order_completed).

In practice, this tends to break when teams identify too early (before they have a stable ID), identify too late (after the cart session is over), or identify with inconsistent IDs across web and mobile (email on web, internal user_id on app). That’s how you end up with duplicate people and leaky abandoned cart audiences.

Step-by-Step Setup

Before you wire anything, decide what “a person” means in your stack and where that truth comes from. The SDK implementation is straightforward—the operational part is choosing the right identifier, calling it at the right time, and keeping it consistent across platforms.

  1. Pick your primary identifier (and don’t change it per platform).
    Use a stable ID you control (usually your internal customer_id). If you must use email, normalize it (lowercase/trim) everywhere.
  2. Install the Customer.io SDK (web + mobile) and initialize it on app start.
    Initialize as early as you can so you capture anonymous events like product discovery and cart building.
  3. Track anonymous events immediately.
    Send events like product_view, add_to_cart, checkout_started even before login. Include useful properties: SKU, variant_id, price, quantity, category, cart_value.
  4. Call identify at the first reliable moment.
    Good triggers: login success, account creation completion, “continue with email” submission, or order confirmation if that’s your first known identifier.
  5. Send a baseline attribute payload with Identify.
    At minimum: email (if you have it), phone (if opted in), first_name, marketing_opt_in, source (app/web), and any loyalty status.
  6. Confirm identity stitching across devices.
    Log in on mobile, browse on web, and ensure both environments identify to the same primary ID. If you see two profiles, your ID strategy is inconsistent.
  7. Instrument a clean logout/reset behavior.
    When a user logs out, reset the SDK identity so you don’t attribute the next user’s activity to the previous customer on shared devices.

When Should You Use This Feature

Identify matters any time you need to target based on behavior that happens before you know who the customer is, or when you want cross-device continuity. If you’re running retention without it, you’ll spend your time debugging segments instead of shipping campaigns.

  • Cart abandonment with login after cart build (common in D2C).
    Scenario: a shopper adds a few items on mobile web, then logs in at checkout for Shop Pay or to use points. If Identify fires at login and your events are already flowing, you can trigger a cart recovery message to the correct person with the exact items they left.
  • Product discovery → delayed purchase.
    When someone browses multiple PDPs anonymously and only later provides an email (newsletter, account, checkout), Identify lets you segment on what they looked at and send relevant replenishment or category follow-ups.
  • Reactivation based on app inactivity.
    If you identify consistently, you can trust “last_seen_in_app” style segments and avoid reactivating people who are actually active on another device/profile.
  • Post-purchase retention personalization.
    Tie order_completed events to the same person who did the browsing so your cross-sell and replenishment logic doesn’t start from zero.

Operational Considerations

Identify is simple to implement and easy to get subtly wrong. The operational reality is that segmentation, data flow, and orchestration all assume identity is stable—so treat this like core infrastructure for retention, not a one-off integration task.

  • Segmentation depends on consistent IDs.
    If web identifies by email and mobile identifies by internal ID, you’ll split behavior into two people. Your “Viewed product but didn’t purchase” segment will undercount and your frequency controls won’t work.
  • Event timing affects cart recovery accuracy.
    If Identify happens after checkout_started, your abandoned checkout flow may never fire (or will fire on an anonymous profile you can’t message). In most D2C funnels, identifying at “email captured” is earlier and safer than waiting for full account creation.
  • Attribute governance prevents segment drift.
    Decide which system owns attributes like marketing_opt_in, lifetime_value, last_order_at. If the app sends stale values via Identify while your backend sends updated values elsewhere, segments will flicker.
  • Orchestration needs a single source of truth for consent.
    If you’ll message via SMS/push, ensure Identify payloads include current consent flags and that your workflows gate sends on them.
  • Duplicate resolution is a symptom, not the fix.
    Customer.io can help resolve duplicates, but the durable fix is aligning identifiers and normalization rules across SDKs and backend calls.

Implementation Checklist

Before you ship campaigns that depend on behavioral targeting, run through this checklist once. It’s faster than debugging why your cart recovery flow “randomly” misses high-intent sessions.

  • Primary identifier chosen (internal customer_id preferred) and documented for web + mobile
  • SDK initialized on app start / earliest page load
  • Anonymous event tracking live for product_view, add_to_cart, checkout_started
  • identify called on login/account creation/email capture (not just post-purchase)
  • Identify payload includes normalized email/phone (when available) + consent attributes
  • Logout/reset behavior implemented to prevent cross-user contamination
  • Cross-device test confirms one person profile receives events from web + app
  • Segments validated: “Added to cart in last 4 hours” matches known users after identify

Expert Implementation Tips

The best retention teams treat identity like a product surface: they test it, monitor it, and keep it boring. These are the patterns that keep Customer.io segmentation trustworthy when volume scales.

  • Identify on “email captured,” not just “account created.”
    If your checkout collects email early, identify there. It’s the difference between recovering the cart and watching it disappear into anonymous space.
  • Send cart state as event properties, not person attributes.
    Cart contents change fast. Keep it on add_to_cart/cart_updated events so your abandoned cart workflow can reference the latest payload.
  • Normalize identifiers at the edge.
    Lowercase emails, strip whitespace, and standardize phone formats before Identify. Most “duplicate people” issues come from sloppy normalization.
  • Use a single “identity contract” across SDK + backend.
    If your backend also sends events, ensure it uses the same person identifier as the SDK. Otherwise, you’ll split purchase events away from browsing behavior.
  • Build a QA segment just for identity health.
    Example: “Has email AND has at least 1 product_view in last 7 days.” If that segment is suspiciously small, your stitching is failing.

Common Mistakes to Avoid

Most Identify problems don’t show up as errors—they show up as underperforming flows. These are the failure modes we see most often when teams think “the campaign is broken,” but the tracking is actually the issue.

  • Identifying with different IDs across platforms.
    Email on web, user_id on mobile = two customers in Customer.io.
  • Calling Identify before you actually know the user.
    Using a temporary ID that later changes creates fragmented histories and messy segments.
  • Waiting until after purchase to identify.
    You lose the entire pre-purchase intent trail that powers cart recovery and browse abandonment.
  • Not resetting identity on logout.
    Shared devices (tablets, family phones) will contaminate profiles and wreck targeting.
  • Overwriting consent attributes accidentally.
    If Identify sends sms_opt_in=false by default when the field is unknown, you’ll silently suppress a chunk of your list.

Summary

If you care about retention performance, implement Identify early, consistently, and with a single primary ID across web and mobile. Once stitching is reliable, your cart recovery and reactivation segments stop leaking—and your workflows become predictable.

Implement Identify with Propel

If you’re rolling out Identify across multiple SDKs and want to avoid the usual stitching and duplication pitfalls, it helps to validate the identity contract and event timing before you build journeys on top of it. We often review Customer.io identity + tracking setups, then map them back to the segments and triggers your retention program actually needs inside Customer.io—if that’s useful, you can 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