Summarize this documentation using AI
Overview
Getting identity right is the difference between “cart abandon works” and “why did only 30% of abandoners enter the flow?” In Customer.io, identity management determines how anonymous browsing turns into a known customer profile, how events attach to that profile, and whether segments/automations stay trustworthy over time—if you want help pressure-testing your data plumbing before it breaks, book a strategy call.
In most retention programs, we’ve seen identity issues show up as silent failures: duplicate profiles, purchases credited to the “wrong” person, or cart events stuck on anonymous users so recovery never fires.
How It Works
On the web, Customer.io typically sees two “states” of a shopper: anonymous (browsing) and identified (you know who they are). The whole game is making sure events collected before identification don’t get stranded on an anonymous profile, and that once you do identify someone, future events consistently land on the same person.
- Anonymous identity starts first. The JS snippet assigns a browser-based anonymous identifier. Pageviews, product views, and add-to-cart events can be captured here before someone logs in or enters email.
- Identification links the browser to a person. When you call an identify action (commonly after email capture, login, or checkout start), you pass an identifier (often
id/user_id, sometimes email/phone depending on your model). That’s the moment Customer.io can attach the browser’s activity to a known profile. - Merging anonymous activity is what saves retention triggers. If you’ve captured anonymous events and then identify the person, you want those events merged into the known profile so “Viewed Product” and “Added to Cart” can drive the same customer journey that sends recovery messages.
- Identity resolution affects segmentation accuracy. If a shopper ends up as two profiles (one anonymous, one identified, or two identified records), your segments drift: “Added to cart, no purchase” might include people who actually purchased—just on a different profile.
- Trigger reliability depends on the identity present at event time. If your cart abandonment journey triggers on
Added to Cartbut that event is anonymous and your campaign is configured to message only identified profiles (email/SMS), the person won’t qualify—even though the event exists.
Step-by-Step Setup
The goal here is simple: collect high-intent web events early, then identify as soon as you have a stable key, and ensure the anonymous history merges cleanly into the identified profile. Do this once and your cart recovery + browse abandonment stops leaking.
- Choose your “source of truth” identifier.
Pick a single primary key you’ll use everywhere (site, backend, ESP, support tools). In practice, a stable internalcustomer_idis safer than email because email can change. - Instrument anonymous events on key retention moments.
Track events likeProduct Viewed,Added to Cart,Checkout Startedwith consistent properties (SKU, variant, price, quantity, cart_id). These can fire before you know who the person is. - Identify immediately when you earn the right to.
Trigger identify on:- email capture (newsletter popup, back-in-stock, quiz results)
- account login
- checkout where email is entered (even before payment)
- Confirm anonymous activity is merged into the identified profile.
After identify, validate that earlier anonymous events appear on the known person in Customer.io. This is the most common “looks fine in code, fails in journeys” gap. - Standardize event naming + required properties.
Retention automations depend on predictable fields. Lock a schema (event names + properties) and enforce it across site changes and app releases. - Backstop with server-side purchase events.
Even if web tracking drops, sendOrder Completedfrom your backend with the same identifier. This prevents misfires like sending cart recovery after someone already bought.
When Should You Use This Feature
Identity management isn’t a “nice to have” feature—you feel it any time you rely on web behavior to drive revenue. If you’re running retention flows that start from anonymous browsing and end in owned channels (email/SMS), this is foundational.
- Cart abandonment with email capture during checkout. A shopper adds a bundle, starts checkout, enters email, then bounces. If you identify at email entry and merge anonymous events, the abandon flow can reference the exact items and fire reliably.
- Browse abandonment for product discovery. Someone views 3 SKUs in a category, then leaves. If they previously subscribed, identity ensures those views attach to the right profile so you can send a tight “Still thinking about…” email.
- Post-purchase cross-sell and replenishment. If purchases land on a different profile than browsing, your “customers who bought X” segment becomes noisy and your replenishment timing gets sloppy.
- Winback/reactivation based on last site activity. If “Last Visited” or recent events are trapped on anonymous profiles, you’ll undercount engaged-but-not-buying customers and over-message true inactive customers.
Operational Considerations
Identity work is where retention orchestration tends to break in practice—usually not because tracking is missing, but because it’s attached to the wrong person. Treat this like infrastructure, not a campaign tweak.
- Segmentation depends on merge behavior. If anonymous events don’t merge, segments like “Added to Cart in last 1 day AND no purchase” will miss people. If merges create duplicates, segments will double-count.
- Decide how you’ll handle email changes. If email is your identifier and a customer updates it, you can accidentally create a new profile. A stable internal ID avoids this, with email as an attribute.
- Event timing matters for triggers. If you identify after the event you care about (e.g., identify only on order complete), your abandonment triggers won’t have a reachable profile at the right time.
- Property mapping is where personalization lives. Cart recovery needs line items; browse abandonment needs SKU/category; reactivation needs last_seen and product affinity. If these properties aren’t consistent, your messages degrade fast.
- Cross-device reality. Anonymous identity is browser-specific. If you rely on anonymous activity, expect gaps when someone browses on mobile Safari and buys on desktop—unless you identify early (email capture/login) to stitch sessions.
Implementation Checklist
If you want journeys and segments you can trust, run through this checklist before you build more flows. It’s faster than debugging “why didn’t they enter?” every week.
- Primary identifier chosen (prefer stable internal customer ID); email/phone stored as attributes
- Anonymous web events implemented for product view, add to cart, checkout start
- Identify call fires at email capture/login/checkout email step (not only post-purchase)
- Anonymous activity merges into identified profile (verified in Customer.io profile activity)
- Consistent event names and required properties documented and enforced
- Server-side
Order Completedevent sent as a source-of-truth backstop - QA segments built to validate counts (e.g., add_to_cart last 24h vs. abandon flow entrants)
- Duplicate profile monitoring process in place (weekly spot checks)
Expert Implementation Tips
Once the basics are in, these are the moves that keep your retention machine stable as the site, offers, and team evolve.
- Identify earlier than you think, but only with a durable key. Email capture is often the sweet spot: early enough for recovery, stable enough for messaging.
- Make cart_id a first-class property. It helps you dedupe events, power smarter “cart updated” logic, and avoid sending recovery for an old cart after a new one starts.
- Build “data sanity” segments. Examples: “Added to Cart in last 6h AND email is blank” (should shrink over time), or “Purchased in last 1d AND in cart abandon segment” (should be near zero).
- Normalize SKU/variant fields. If half your events send
skuand the other half sendproduct_sku, your dynamic blocks will fail silently and your segmentation will fragment.
Common Mistakes to Avoid
Most identity problems look like messaging problems until you trace the data. These are the ones that repeatedly cost D2C teams real revenue.
- Identifying only after purchase. Great for post-purchase, terrible for abandonment. Your highest-intent pre-purchase events stay anonymous.
- Using email as the sole ID without a plan for changes. One email update can create a “new customer” profile and split lifetime value and purchase history.
- Assuming events are usable because they’re visible. Seeing an event in the system doesn’t mean it’s attached to a reachable profile for email/SMS.
- Inconsistent event schemas across web and backend. If web sends
Order Completedwith one structure and backend sends another, segments and journey conditions become brittle. - Not validating merges after site changes. A checkout update or new subscription app can quietly break identity stitching, and you won’t notice until recovery revenue dips.
Summary
If your retention automations start from web behavior, identity management is the foundation. Track anonymous intent early, identify as soon as you have a stable key, and verify merges so segments and triggers stay accurate.
If you’re seeing gaps in cart recovery entrants or messy duplicates, fix identity before you “optimize” messaging.
Implement Js Source Identities with Propel
When teams tighten up JS identity and merge behavior, cart recovery and browse abandonment usually become more predictable overnight—because the right events finally land on the right profile at the right time. If you want a second set of eyes on your Customer.io identity plan (what to use as the primary ID, where to identify, and how to QA merges against real journeys), you can book a strategy call and we’ll pressure-test it like an operator would.