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

# Install the browser SDK

> Install @gethinto/browser-sdk, initialize capture, and register your app origin.

Hinto needs session evidence from your web app. This guide covers the manual install path. If you use a coding agent, Hinto's onboarding hands you a short prompt with your ingest key, ingest URL, and this documentation link.

## What you need first

1. An **ingest key**, minted in Hinto under Settings, API keys, or handed to you by the onboarding step. An ingest key is a publishable browser key: it can only write session data, it cannot read tickets, customers, or investigations, and you can revoke it at any time.
2. Your app's **origin** registered in Hinto (Settings, API keys, Allowed app origins). The browser blocks requests from an unregistered origin before they ever reach Hinto. Add `http://localhost:3000` (or whichever port you use) while you develop.

## Install

```bash theme={null}
npm i @gethinto/browser-sdk
```

Use whichever package manager the project already uses.

## Initialize

Initialize once at app startup, and keep the returned client so you can call `identify` later.

```js theme={null}
import { initHinto } from "@gethinto/browser-sdk";

const hinto = initHinto({
  ingestUrl: "https://your-hinto-api-host/v1/ingest",
  apiKey: import.meta.env.VITE_HINTO_INGEST_KEY, // or your framework's public env var
});
```

Put the key in an environment file rather than hard-coding it. It ends up in your frontend bundle either way, which is fine for this key class, but an env var is what lets you rotate it without a code change.

## Identify your users

After sign-in, call `identify` so sessions attach to a customer. See [Identify users](/identify) for email vs external id and why it matters.

## Verify it works

Run your app, sign in, and load a page. In Hinto, the onboarding SDK step flips to first session received on its own, and the Evidence page starts reporting session coverage.

## Related guides

* [Identify users](/identify)
* [Privacy controls](/privacy)
* [Troubleshooting](/troubleshooting)
* [SDK reference](/sdk)
