# JavaScript

`@newtalaria/browser` **0.6.1** is the official browser SDK. React, Next.js, and Node.js are [guides under this platform](https://docs.newtalaria.com/sdk/javascript/react.md).

## Install

```bash
npm install @newtalaria/browser
```

## Initialise

```ts
import { Talaria } from '@newtalaria/browser';

Talaria.init({
  apiKey: 'tal_pk_prod_nz1_…',
  release: '1.4.2',
  minLevel: 'warning',
});
```

Use a **publishable** key in the browser. The API key decides the environment. Tracing, analytics, heatmaps, and session replay follow [project settings](https://docs.newtalaria.com/get-started/project-settings.md). Leave `url` unset on Talaria Cloud.

## Verify

```ts
Talaria.captureException(new Error('Talaria test error'));
```

Run this once, then open **Issues** in the [dashboard](https://one.newtalaria.com). The test error shows as a new issue in the key's environment. Nothing there? See [troubleshooting](https://docs.newtalaria.com/sdk/javascript/troubleshooting.md).

## Next

See [fail-safe](https://docs.newtalaria.com/get-started/fail-safe.md), [configuration](https://docs.newtalaria.com/sdk/javascript/configuration.md), [errors](https://docs.newtalaria.com/sdk/javascript/errors.md), and [tracing](https://docs.newtalaria.com/sdk/javascript/tracing.md).
