Summarize this documentation using AI
Overview
If you’re running retention through Customer.io, mobile lifecycle events are the difference between “we sent a push” and “we actually know what the user did in the app.” They give you reliable signals like app install, app open, app background/foreground, and session activity—so your cart recovery, reactivation, and repeat purchase flows trigger off real behavior, not guesses. If you want a second set of eyes on your event plan and identity stitching, book a strategy call and we’ll pressure-test it like an operator.
In most retention programs, lifecycle events become the backbone for mobile segmentation (active vs dormant), send-time choices (don’t hit someone mid-session), and attribution sanity checks (did they open the app after that push, or did we just annoy them?).
How It Works
Lifecycle events are emitted by the Customer.io Mobile SDK as the app transitions through states (first install, open, foreground/background, etc.). Customer.io stores these as activity on the person profile, which you can then use for segmentation and orchestration in campaigns and journeys.
- SDK captures lifecycle moments: the app triggers lifecycle callbacks, and the SDK sends those events to Customer.io automatically (or semi-automatically depending on platform and configuration).
- Identity stitching happens through identify(): anonymous app activity is only useful if you connect it to a real customer when they log in, checkout, or submit an email/SMS. The key operational moment is calling
identify()as soon as you have a stable identifier. - Lifecycle + custom events work together: lifecycle events tell you “they’re active,” while your custom events tell you “they did something valuable” (viewed product, added to cart, started checkout, purchased).
- Segmentation becomes reliable: instead of building “active user” off a flaky last_purchase date, you can build it off “app opened within the last X days” and then layer commerce intent on top.
A realistic D2C scenario: someone adds items to cart on mobile, gets distracted, and closes the app. If you’re tracking Added to Cart but you’re missing lifecycle, you’ll often fire a push while they’re still actively browsing (bad timing) or you’ll misclassify them as inactive. With lifecycle events, you can wait until they’ve been backgrounded for 30–60 minutes and then trigger a clean cart recovery sequence that doesn’t cannibalize the session.
Step-by-Step Setup
Before you touch journeys, you want the SDK sending clean lifecycle signals and you want identity stitching to be deterministic. Most “Customer.io didn’t trigger” issues on mobile trace back to identify() timing, duplicate profiles, or events firing before consent.
- Install the Customer.io Mobile SDK
- Add the SDK for your platform (iOS/Android/React Native/Flutter/Expo) and confirm the workspace/site settings match your environment (dev vs prod).
- Verify network calls from the app to Customer.io in a debugger/proxy so you’re not troubleshooting blind later.
- Initialize the SDK early in app launch
- Initialize in the app’s startup path so lifecycle events are captured consistently (especially first open after install).
- In practice, this tends to break when initialization happens after a splash/login flow—your “first open” and early session signals get lost.
- Implement identity stitching with identify()
- Call
identify()immediately when you have a stable identifier (email, customer ID, phone—whatever you use as the canonical key). - If your app supports guest browsing, let the SDK collect anonymous activity, then stitch it on login/checkout so cart and browse intent carry through.
- Set key attributes at identify time (e.g.,
email,phone,first_name,marketing_opt_in,platform).
- Call
- Confirm lifecycle events are actually arriving
- Open a test user profile in Customer.io and validate you see recent activity that corresponds to app opens/foregrounding.
- Test: fresh install → open → background → reopen. You’re looking for consistent timestamps and no gaps.
- Layer in retention-critical custom events
- Track
Product Viewed,Added to Cart,Checkout Started, andOrder Completedfrom the app side (or ensure parity with web if you’re cross-platform). - Include properties you’ll actually segment on: SKU, category, price, cart value, currency, discount flag, and inventory status if available.
- Track
- QA identity + event order
- Make sure events that matter (cart, checkout) happen after identify whenever possible, or you’ll strand high-intent events on anonymous profiles.
- If you can’t guarantee ordering, plan for merge behavior and validate it with real devices.
When Should You Use This Feature
Lifecycle events matter most when timing and “active vs dormant” status changes your messaging outcome. If you’re sending push/in-app, or if mobile is a meaningful purchase channel, you’ll feel the impact quickly.
- Cart recovery that respects sessions: trigger only after the app has been backgrounded for a set window, and suppress if they reopen the app and continue shopping.
- Reactivation for lapsed app users: build segments like “no app open in 14 days” and run winback sequences that escalate from push → email → SMS.
- Repeat purchase nudges: for consumables, use “last app open” + “last purchase” to avoid sending replenishment to someone who’s currently browsing (or who just bought).
- Post-purchase retention: confirm the customer returned to the app after delivery window starts; if not, prompt UGC/review in email, but use push when they’re active again.
Operational Considerations
Lifecycle data is easy to collect and easy to misuse. The operational win is turning noisy app activity into stable segments and predictable orchestration rules.
- Segmentation: define “active” and “dormant” once
- Pick thresholds that match your purchase cycle (e.g., active = app open in 7 days; at-risk = 8–21; dormant = 22+).
- Keep definitions consistent across push, email, and SMS so channels don’t fight each other.
- Data flow: watch for duplicates and late identify()
- Duplicate profiles show up when users reinstall, use multiple emails, or identify with different IDs across platforms.
- Make your “source of truth” identifier explicit (customer ID is usually safer than email if email can change).
- Orchestration: lifecycle should gate sends
- Use lifecycle events to suppress messages during active sessions and to time outreach after disengagement.
- In practice, this tends to break when teams only trigger off commerce events and forget to add “is the app currently active?” logic.
- Consent and platform constraints
- If you delay tracking until consent, expect gaps in lifecycle data and plan segments accordingly.
- Push permission timing affects your reachable audience; don’t assume “mobile user” equals “push addressable.”
Implementation Checklist
Use this like a pre-flight check before you build automations. If any of these are missing, your retention logic will look right in the canvas and still underperform in the wild.
- SDK installed and initialized at app launch (prod build verified)
identify()called immediately on login/checkout, using a stable canonical identifier- Anonymous activity is either merged correctly or intentionally discarded (decision documented)
- Lifecycle activity visible on a test profile in Customer.io with correct timestamps
- Custom commerce events implemented with properties you plan to segment on (SKU/category/value)
- Cross-platform identity plan defined (web + app share the same customer ID strategy)
- Suppression rules defined: don’t send cart recovery while app is active; stop on purchase
Expert Implementation Tips
These are the small choices that prevent weeks of “why is performance weird?” later—especially once you scale spend and acquisition starts feeding your retention machine.
- Gate cart recovery on “session ended,” not just time: if you only use a delay after
Added to Cart, you’ll hit people mid-browse. Use lifecycle signals to confirm they actually left. - Send identify() before high-intent events when possible: if checkout starts before login, consider a lightweight “email capture” step earlier so you stitch intent to a reachable profile.
- Standardize event names and properties across app and web: “Added to Cart” vs “AddToCart” seems minor until you try to build one segment for both.
- Use lifecycle to set a single ‘last_active_at’ attribute: many teams create multiple competing definitions of activity. Derive one and build everything off it.
Common Mistakes to Avoid
Most mobile retention issues aren’t creative problems—they’re tracking and identity problems that quietly poison your segments.
- Calling identify() too late: you end up with cart and browse intent stuck on anonymous users, so recovery flows undercount and attribution looks off.
- Using email as the only identifier when emails change: this creates fractured histories and “reactivation” messages to people who are actually active under another profile.
- Triggering push while the user is in-app: it tanks experience and can reduce conversion because you interrupt checkout or product discovery.
- Over-tracking lifecycle without a plan: collecting events is easy; using them to drive holdouts, suppressions, and timing is where the lift comes from.
- Not validating on real devices: simulators don’t always behave like production (backgrounding, network, notification permissions).
Summary
If mobile is part of your purchase journey, lifecycle events are foundational retention instrumentation. Get SDK initialization and identify() right, then use lifecycle signals to time cart recovery, define active/dormant segments, and keep journeys from firing at the wrong moment.
Implement Lifecycle Events with Propel
If you’re already on Customer.io, the fastest win is usually tightening identity stitching and turning lifecycle signals into practical suppression + timing rules across push/email/SMS. If you want help mapping the exact events and gates for your cart recovery and reactivation flows, book a strategy call—we’ll focus on clean tracking and orchestration that holds up once volume scales.