Skip to main content
What happens when you track an event in your app? This guide walks through the path from capture to campaigns and analytics.

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)

// User clicks "Add to Cart"
Zixflow.track('Product Added', {
  product_id: 'prod_123',
  product_name: 'Red Sneakers',
  price: 89.99,
  currency: 'USD'
});
The SDK automatically adds:
  • Timestamp (millisecond precision)
  • Device information (model, OS, screen size)
  • User identification (userId if logged in, otherwise anonymousId)
  • Location context (timezone, country, language when available)
Capture is near-instant and does not block your UI.

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)
Zixflow.track('Purchased', { order_id: 'ord_123', total: 499.99 });
Zixflow.flush();  // Send now — don't wait for the batch

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
Enrichment: Server timestamp, geolocation from IP (when available), and campaign attribution tags. Deduplication: Duplicate sends from network retries are collapsed so reports are not double-counted.

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