Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.seerstack.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide shows you how to integrate SeerStack into your application. You’ll learn how to authenticate, identify users, and send your first event.

1. Get your API Key

You need an API key to send data to SeerStack.
  1. Log in to the SeerStack Dashboard.
  2. Go to Settings > Developer.
  3. Copy your Publishable Key.

2. Install the SDK

Install the official TypeScript/JavaScript library:
npm install seerstack

3. Initialize the client

import Seerstack from 'seerstack';

const client = new Seerstack({
  apiKey: process.env['SEERSTACK_API_KEY'], // e.g. 'sk_live_...'
});

4. Send an event

Send a test event to verify your integration.
const response = await client.events.capture({
  name: 'test.event',
  user_id: 'internal_user',
  data: {
    message: 'Hello World',
    browser: 'Chrome'
  }
});

console.log(response.success); // true
Check your Dashboard — you should see the event appear instantly.

5. Identify a user (optional)

Associate user traits to enrich your events with user context.
await client.users.identify({
  user_id: 'user_123',
  email: '[email protected]',
  name: 'Grace Hopper',
  attributes: {
    plan: 'enterprise',
    team_size: 15
  }
});

Next steps

Identities

Learn how to attach profiles to your users.

Datasources

Connect your production database for deeper insights.

API Reference

Explore the full API documentation.

Events

Learn event best practices.