Skip to main content

Configuration

Signal JS requires apiKey and projectId to send data. All other options have sensible defaults.

Required Options

import { createSignal } from '@signal-js/browser';

const signal = createSignal({
  /** API key for authentication */
  apiKey: 'your-api-key',
  
  /** Project identifier */
  projectId: 'your-project-id',

  /**
   * Optional: API endpoint for sending events.
   * @default https://api.trysignal.ai/
   */
  // endpoint: 'https://api.trysignal.ai/',
});

await signal.start();

Optional: Server-Side Correlation

If you’re tracking events on the server, enable tracing headers to link client and server events:
const signal = createSignal({
  apiKey: 'your-api-key',
  projectId: 'your-project-id',
  
  // Enable tracing headers for server correlation
  addTracingHeaders: true, // or ['api.example.com'] for specific hostnames
});

Learn More

For advanced configuration options, see: