> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zixflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Initialize the SDK and send your first event with JavaScript.

### Browser Quick Start

```javascript theme={null}
import { AnalyticsBrowser } from '@zixflow/analytics-browser'

// Initialize with your API key
const analytics = AnalyticsBrowser.load({
  apiKey: 'YOUR_API_KEY'
})

// Identify a user
analytics.identify('user@example.com', {
  first_name: 'John',
  last_name: 'Doe',
  email: 'user@example.com'
})

// Track an event
analytics.track('button_clicked', {
  button_name: 'signup',
  page: 'homepage'
})

// Track a page view
analytics.page('Home', {
  title: 'Homepage',
  url: window.location.href
})
```

### Node.js Quick Start

```javascript theme={null}
import { Analytics } from '@zixflow/analytics-node'

// Initialize with your API key
const analytics = new Analytics({
  writeKey: 'YOUR_API_KEY'
})

// Identify a user
analytics.identify({
  userId: 'user@example.com',
  traits: {
    first_name: 'John',
    last_name: 'Doe',
    email: 'user@example.com'
  }
})

// Track an event
analytics.track({
  userId: 'user@example.com',
  event: 'purchase_completed',
  properties: {
    product_id: '123',
    price: 29.99,
    currency: 'USD'
  }
})

// Flush events before exit
await analytics.closeAndFlush()
```

***
