The Big Picture
Typical time to availability: 2–5 seconds after the event leaves the device.What Happens at Each Stage
1. Event Capture (In Your App)
- Timestamp (millisecond precision)
- Device information (model, OS, screen size)
- User identification (
userIdif logged in, otherwiseanonymousId) - Location context (timezone, country, language when available)
2. Smart Batching
Sending every event immediately would drain batteries and waste bandwidth. The SDK batches instead:- Holds events in memory (typically up to ~20)
- Flushes when the batch is full, after ~30 seconds, or when the app backgrounds
- You can force an immediate send with
flush()for high-priority actions (e.g. purchases)
3. Offline Support
- Events are stored securely on device when offline
- Retries use exponential backoff (avoids battery drain)
- Chronological order is preserved
4. Secure Transmission
- HTTPS / TLS in transit
- Workspace API key authenticates each request
- Invalid or tampered requests are rejected
- Keys can be rotated without downtime
5. Processing & Enrichment
Validation: Required fields and types are checked; malformed events are rejected. Identity resolution:- Anonymous events attach to a consistent anonymous profile
- Devices registered before signup migrate on
identify()— see Users & Identity - Multi-device activity links via shared
userId
6. Storage & Availability
Once stored, events power:- Analytics — funnels, retention, feature usage
- Campaign triggers — e.g. cart add without purchase within 2 hours → push reminder
- Segments — audiences based on behavior and attributes
Next: See real-world implementation examples → E-commerce Tracking