Summarize this documentation using AI
Overview
If you’re serious about cart recovery, repeat purchase, and reactivation, the work starts on the app side—clean identity, clean events, and predictable data flow into Customer.io. If you want a second set of eyes on your tracking plan before you ship (or you’re untangling messy identity), book a strategy call and we’ll pressure-test it like an operator would.
In most retention programs, the “marketing problem” is actually a tracking problem: users browse anonymously, log in later, and your automations either miss them or double-message them. The goal of a 3.x SDK rollout is simple—capture high-intent behavior in-app, stitch it to a real customer, and make it usable for segmentation and orchestration.
How It Works
The SDK is your source of truth for what a shopper actually does in your mobile app (or web app): screen views, product interest, cart changes, checkout starts, and post-purchase behavior. Customer.io turns that stream into person profiles (attributes) and event timelines that you can segment and trigger off of.
- Install + initialize: the SDK boots with your Customer.io site/workspace credentials and starts collecting app activity you explicitly send.
- Anonymous first, then identify: most shoppers start anonymous. The moment you have a stable identifier (login, account creation, or verified email/phone), you call
identifyso future events land on the right profile. - Identity stitching: the critical part is ensuring pre-login events (like
Viewed ProductorAdded to Cart) get associated to the now-known user instead of living on an orphan anonymous profile. In practice, this tends to break when teams identify too late, identify with the wrong ID, or create multiple IDs per person. - Track events with useful properties: events without properties don’t segment well. Your retention triggers usually need SKU, category, cart value, currency, and timestamps—otherwise your “cart abandoner” audience gets noisy fast.
- Send people attributes intentionally: attributes like
email,phone,first_order_date,last_order_date,lifetime_value, andpush_opt_inare what make suppression, frequency, and channel routing actually work.
Real D2C scenario: a shopper adds a $78 skincare bundle to cart on mobile, closes the app, then signs in the next morning. If you identified only at checkout (too late), your cart recovery workflow never fires. If you identify at login and stitch the anonymous cart events, you can trigger a push within 30 minutes, then fall back to email/SMS based on consent—without spamming someone who already purchased.
Step-by-Step Setup
Before you touch workflows, get the SDK foundation right. You’re aiming for: one person = one stable identifier, events that match your retention use cases, and a clear rule for when you call identify.
- Pick your primary identifier.
Use a stable internalcustomer_idif you have it. Avoid using email as the ID if emails can change or you have guest checkout patterns. Decide this once—changing later is painful. - Install the Customer.io 3.x SDK in your app.
Implement via your platform (iOS/Android/React Native/Flutter/Web). Keep the installation minimal at first—don’t ship 40 events on day one. - Initialize the SDK at app start.
Do it early in the app lifecycle so you don’t miss first-session events. Confirm you’re pointing to the correct workspace/environment (prod vs staging). - Implement
identifyat the first reliable moment.
Common triggers: successful login, account creation, magic-link verification, or when a guest provides verified email/phone. Also send core attributes (email/phone if available, marketing consent flags, locale/timezone if relevant). - Implement
trackfor your retention-critical events.
Start with a tight set:Viewed Product(properties: sku, product_id, category, price)Added to Cart(sku/product_id, quantity, price, cart_value)Started Checkout(cart_value, item_count, shipping_country)Order Completed(order_id, revenue, currency, items[])
- Handle logout explicitly.
When a user logs out, reset/clear the identified user in the SDK so the next person on that device doesn’t inherit the wrong identity. - Validate in Customer.io Activity Logs.
Use a test device/account and confirm: events arrive, properties are present, and the profile shows the right identifiers and attributes.
When Should You Use This Feature
SDK tracking is the right move whenever app behavior is the signal you need to drive retention. If you’re relying only on Shopify or backend order events, you’ll miss the intent that powers your best-performing recovery and replenishment programs.
- Cart recovery that actually works on mobile: trigger off
Added to Cartand suppress ifOrder Completedarrives within a window. - Browse abandonment / product discovery: if someone views the same category 3+ times in 7 days, you can route them into a product education or UGC-heavy sequence.
- Repeat purchase timing: use
Order Completedplus SKU/category properties to time replenishment (e.g., 21–35 days after first purchase for consumables). - Reactivation based on app inactivity: last app open + last purchase + category affinity is a stronger winback segment than “hasn’t ordered in 90 days” alone.
Operational Considerations
Once the SDK is live, the operational work is keeping the data clean enough that segmentation and orchestration don’t drift over time. Most teams underestimate how quickly “just one more event” turns into inconsistent naming and broken audiences.
- Segmentation reliability: standardize event names and property keys early (e.g., always
product_idnot sometimesproductId). Segments will silently undercount if your taxonomy is inconsistent. - Identity stitching rules: decide what happens for guest users. If you allow guest checkout, you still need a plan to identify when you capture email/phone—otherwise cart and browse signals stay anonymous and unusable.
- Data flow timing: SDK events can arrive out of order in real life (offline mode, background delivery). Build workflows with short buffers (e.g., wait 15–30 minutes) and use suppression checks before sending.
- Orchestration realities: cart recovery often spans push + email + SMS. Your SDK needs to send opt-in state (push permission, SMS consent) as attributes so Customer.io can route to the right channel without guesswork.
- Environment hygiene: keep staging and prod separated. Nothing derails QA like test events polluting production segments.
Implementation Checklist
If you want this to drive revenue (not just “data”), treat this like a launch checklist. You’re done when you can build a segment and trust it.
- Primary identifier chosen and documented (and consistent across app + backend)
- SDK initialized on app start in the correct environment
identifycalled on login/account creation with core attributes- Logout clears/reset identity to prevent cross-user contamination
- Retention-critical events implemented with consistent properties
- Consent/opt-in attributes sent (push, email, SMS where applicable)
- Test plan executed: anonymous browse → login → add to cart → purchase
- Customer.io Activity Logs confirm correct profile stitching and event payloads
Expert Implementation Tips
These are the small operator moves that keep your automations accurate at scale—especially once you’re running multiple flows that depend on the same events.
- Identify earlier than you think. If you wait until checkout, you’ll miss the highest-volume recovery audience. Login, email capture, and verified phone are your best “identify moments.”
- Send cart state, not just cart actions. An
Added to Cartevent is helpful, but a periodicCart Updatedwithcart_valueanditem_countmakes segmentation and suppression more robust. - Use a short delay before first recovery message. A 15–30 minute wait reduces false positives from people who resume checkout naturally, and it gives your purchase event time to arrive.
- Make SKU/category properties first-class. That’s how you graduate from generic “come back” to targeted replenishment and cross-sell based on what they actually touched.
- Plan for duplicates. If your app can create multiple accounts per device (common with family tablets), be strict about logout and avoid caching identity longer than you should.
Common Mistakes to Avoid
Most retention issues look like creative or offer problems, but they’re often caused by basic SDK implementation mistakes that quietly poison segments and triggers.
- Identifying with email as ID, then changing emails later. This splits a customer into multiple profiles and breaks LTV-based suppression.
- Calling
identifytoo late. If the user browses and carts anonymously, your recovery programs won’t see the intent. - Inconsistent event naming.
add_to_cartvsAdded To Cartbecomes two different realities in segmentation. - Missing properties. Without
cart_valueorcurrency, you can’t prioritize high-value abandoners or run clean reporting. - Not clearing identity on logout. This causes the worst kind of error: messaging the wrong person based on someone else’s behavior.
- No suppression logic. If you don’t check for a purchase event before sending, you’ll inevitably hit customers with “you left something behind” after they already bought.
Summary
If you want Customer.io to drive retention outcomes, the 3.x SDK setup needs to nail identity and high-signal events first. Get identify right, keep your event taxonomy tight, and build workflows that assume real-world timing quirks.
Implement 3.x with Propel
Once the SDK is wired, the next step is turning those events into segments and flows that don’t leak revenue through misfires and duplicates. If you’re implementing or cleaning up Customer.io tracking, we’ll help you design the identity strategy, event schema, and suppression rules so your automations behave in production—grounded in what we typically see across D2C retention programs running on Customer.io. When you’re ready, book a strategy call and we’ll map the fastest path from SDK events to repeat purchase and recovery lifts.