The Big Picture
When a user takes an action in your app, here’s what happens:What Happens at Each Stage
1. Event Capture (In Your App)
What happens: The Zixflow SDK in your app detects a user action and captures it as an event. Example:- SDK adds timestamp (down to the millisecond)
- Adds device information (phone model, OS version, screen size)
- Adds user identification (their user ID if logged in, or anonymous ID if not)
- Adds location context (timezone, country, language)
2. Smart Batching (Battery & Performance)
The challenge: Sending every single event immediately would drain phone batteries and use lots of data. The solution: The SDK intelligently batches events before sending them. How batching works:- SDK collects events in memory (holds up to 20 events)
- Sends the batch when:
- 20 events collected (batch is full)
- 30 seconds passed since last send (time limit)
- User closes/backgrounds the app (immediate flush)
- Battery life: 90% less network activity = longer battery life
- Data usage: Batching multiple events in one request uses less data
- Performance: App stays responsive, no lag from network calls
3. Offline Support (Works Without Internet)
What happens when there’s no internet?- SDK saves events locally on the device (in secure storage)
- When internet returns, SDK automatically sends all saved events
- Events are sent in the correct chronological order
- Nothing is lost!
- If send fails, SDK waits 1 second and tries again
- If it fails again, waits 2 seconds, then 4, then 8, then 16 seconds
- Maximum 10 retry attempts before giving up
- This prevents battery drain from infinite retry loops
4. Secure Transmission
How events reach Zixflow:- Sent over HTTPS (encrypted, same security as online banking)
- Your API key authenticates each request (ensures events are really from your app)
- Zixflow validates the request and accepts the events
- All data encrypted in transit (TLS 1.3)
- API keys are workspace-specific (one compromised key doesn’t affect others)
- Invalid or tampered requests are rejected
- You can rotate API keys anytime without downtime
5. Processing & Enrichment
What Zixflow does with your events: Validation:- Checks required fields are present (user ID, event name, timestamp)
- Validates data types (numbers are numbers, dates are valid dates)
- Rejects malformed events (protects data quality)
- If the event is from an anonymous user, Zixflow automatically creates an anonymous profile and links the event to it. This ensures even pre-signup behavior is stored under a consistent profile ID.
- If a device token is registered before sign-up, the device is linked to the anonymous profile and automatically migrated to the identified user when they call
identify(). - When a user identifies themselves (signs up or logs in), Zixflow merges their anonymous history into a single identified profile. The original
first_seen_attimestamp is preserved — it reflects when the user first engaged, not when they signed up. - Events across multiple devices are linked to the same user profile via their shared
userId.
- Adds server-side timestamp (to detect clock skew on devices)
- Adds geolocation data (country, region, city from IP address)
- Tags events with campaign attribution (which ad/email drove this action)
- Detects if the same event was sent twice (network retry)
- Keeps only one copy (prevents double-counting in reports)
6. Storage & Availability
Where events go: Events are stored in Zixflow’s data platform optimized for two things:- Fast queries: Run complex reports without waiting
- Scalability: Handle millions of events per day
Next: See real-world implementation examples → E-commerce Tracking