> ## 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 Node.js SDK and send your first event.

### Initialize

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

const analytics = new Analytics({
  writeKey: 'YOUR_WRITE_KEY'
})
```

### Identify a user

```javascript theme={null}
analytics.identify({
  userId: 'user@example.com',
  traits: {
    first_name: 'John',
    last_name: 'Doe',
    email: 'user@example.com'
  }
})
```

### Track an event

```javascript theme={null}
analytics.track({
  userId: 'user@example.com',
  event: 'purchase_completed',
  properties: {
    product_id: '123',
    price: 29.99,
    currency: 'USD'
  }
})
```

### Flush before exit

Always flush pending batches before the process exits:

```javascript theme={null}
await analytics.closeAndFlush()
```

Next: [Core Features](/documentation/sdk/nodejs/core-features) · [API Reference](/documentation/sdk/nodejs/api-reference)
