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

# JavaScript QuickStart

Install from npm or CDN, initialize with your public API key, and call **one function** — `get()`. **That's it.**

## **Quick start**

```text theme={null}
import { Keverd } from '@keverdjs/agent'; // or @keverdjs/react, @keverdjs/vue, @keverdjs/angular

Keverd.init('YOUR_PUBLIC_API_KEY');

const result = await Keverd.get();

console.log(result.event_id, result.visitor_id);
```

### **1. Install**

**npm:**

```text theme={null}
npm install @keverdjs/agent
# or: yarn add @keverdjs/agent
```

**CDN:**

```text theme={null}
<script src="https://cdn.keverd.com/sdk/v1/keverd-sdk.min.js"></script>
```

With CDN, the SDK is available as `window.Keverd`.

### **2. Initialize with public API key**

```text theme={null}
import { Keverd } from '@keverdjs/agent';

Keverd.init('YOUR_PUBLIC_API_KEY');
```

Or with options: `Keverd.init({ apiKey: 'YOUR_PUBLIC_API_KEY', endpoint: 'https://api.keverd.com' })`

### **3. Call one function**

```text theme={null}
const result = await Keverd.get();

console.log(result.event_id, result.visitor_id);
```

**That's it.** Call `get()` on page load or at login/checkout/registration; send `event_id` and `visitor_id` to your backend.

## **When to use this SDK**

* Any HTML/JS app (plain JS, jQuery, or minimal tooling).
* Login, checkout, or registration pages where you can run a small script.
* You prefer npm, yarn, or CDN without a framework wrapper.
