The Two Types of Users
Every person who interacts with your product exists in one of two states: anonymous or identified.Anonymous Users
An anonymous user is someone using your product before you know who they are. They haven’t signed up, logged in, or given you an email. When someone first visits your site or opens your app, the SDK generates ananonymousId (UUID) and stores it:
- Web: First-party cookie (or localStorage fallback)
- Mobile: Keychain (iOS) or SharedPreferences (Android)
- Server-side: Your session layer (you generate and pass it)
What you can do
- Track behavior and funnels
- Personalize in-session experiences
- Attribute first-touch campaigns
- Send push if a device token is registered before signup
What you cannot do
- Email or SMS them (no contact info yet)
- Unify activity across devices until they identify on each device
Identified Users
An identified user is someone you know. Callidentify() when they sign up, log in, capture email, use OAuth, or complete guest checkout:
Identity Merging
Identity merging connects pre-signup activity to the known profile when you callidentify() with both userId and anonymousId (SDKs usually send the current anonymous ID automatically).
What Zixflow does:
- Finds events (and devices) for that
anonymousId - Upgrades the anonymous profile in place —
first_seen_atstays as the first visit, not signup time - Links history under the identified
userId - Prevents duplicate merges
Choosing a User ID
| Approach | Pros | Cons |
|---|---|---|
| Database primary key (recommended) | Stable, unique | Less readable in reports |
| Readable | Can change; privacy in logs | |
| Username | Readable | Often changeable |
User Profiles
After identification, Zixflow maintains a profile with:- Core identity:
user_id, email, name, phone, originalanonymous_id - Custom attributes from
identify()traits andsetProfileAttributes() - System metadata: first seen, last updated, last seen
- Linked events and devices
Multiple Devices Per User
Each login on a new device callsidentify() with the same userId and a different device token. You can push to all devices or target a platform, and see cross-device journeys in one timeline.
Common Scenarios
First-time visitor
SDK createsanonymousId → events tracked anonymously.
Returning visitor (not logged in)
Same cookie/storage → sameanonymousId → history continues.
Signup / login
identify(userId, anonymousId) → merge → future events are identified.
Logout
CallclearIdentify() so a new anonymous session starts cleanly:
Switch devices
Identify on each device with the sameuserId → histories merge into one profile.
User Lifecycle States
Server-controlled states (not from the client SDK):| Event | Effect |
|---|---|
User Deleted | Soft-deletes profile; deactivates linked devices |
User Suppressed | Blocks all outbound channels |
User Unsuppressed | Resumes normal delivery |
Device Registration Before Signup
- Device registers under
anonymousId— push can send immediately - User signs up — app calls
identify() - Devices migrate to the identified profile — no re-registration needed
Next: Learn how to register devices for push → Devices & Push Notifications