Skip to Content
Getting StartedQuickstart: Events

Quickstart: Events

Set up real-time event collection, define contracts for data quality, and forward events to downstream tools.

Prerequisites

  • A Zeotap workspace
  • An application or website that can send HTTP requests
  • (Optional) Destinations configured for event forwarding

Step 1: Create an Event Source

Event sources authenticate clients and route events to the correct pipeline. Each event source has a write key used to send events.

  1. Navigate to Streams > Event Sources
  2. Click Create Event Source
  3. Name your event source (e.g., “Production Web App”)
  4. Copy the generated write key — you’ll need it to send events

Step 2: Send Your First Event

Zeotap accepts events in a Segment-compatible format. Send an event using curl:

curl -X POST https://composable.zeotap.com/api/v1/events/track \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_WRITE_KEY" \ -d '{ "type": "track", "event": "Product Viewed", "userId": "user_123", "properties": { "product_id": "prod_456", "product_name": "Premium Widget", "price": 49.99, "category": "widgets" }, "timestamp": "2024-01-15T10:30:00Z" }'

Step 3: Define an Event Contract

Event contracts enforce a schema on incoming events to ensure data quality.

  1. Navigate to Streams > Contracts
  2. Click Create Contract
  3. Select the event type (e.g., “Product Viewed”)
  4. Define required and optional properties with types
  5. Choose a violation policy:
    • Allow — Accept all events, flag violations
    • Drop Property — Remove non-conforming properties
    • Reject — Reject events that violate the contract
  6. Click Save

Step 4: Set Up Event Forwarding

Forward events in real-time to downstream tools.

  1. Navigate to Streams > Forwarding
  2. Click Create Forwarding Rule
  3. Select a destination (e.g., Amplitude, Mixpanel)
  4. Configure event filters (which events to forward)
  5. Map event properties to destination fields
  6. Click Save

Step 5: Debug Events

  1. Navigate to Streams > Debugger
  2. See events arriving in real-time
  3. Filter by event type, user ID, or write key
  4. Inspect individual events for schema compliance

Next Steps

Last updated on