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

# Browser SDK Overview

> Track user behaviour on your website after a QR Code scan using the Scanova Browser SDK — page views, clicks, scroll depth, form submissions, and custom events.

The Scanova Browser SDK is a lightweight JavaScript snippet (\~10 KB) that you add to your website once. After installation, it automatically tracks page views, link clicks, scroll depth, and form submissions — all attributed to the QR Code scan that brought the user to your site.

## What the SDK does

When a user arrives at your site via a QR Code scan, the URL contains a `scnv` parameter:

```
https://yoursite.com/?scnv=7ad26d4f-3181-4ef8-b6ca-b8f59499dd43
```

The SDK:

1. **Reads the `scnv` parameter** and saves it to `localStorage` (60-day expiry)
2. **Tracks built-in events** automatically (page views, clicks, scroll, forms) based on your configuration
3. **Attaches attribution** — every event carries the `scan_session_id`, linking it to the originating QR Code
4. **Persists across pages** — if a user navigates to another page on your site, the attribution follows them

## Auto-tracked events

Enable these with a single toggle in the init options:

| Option         | What it tracks                                           | Event type sent |
| -------------- | -------------------------------------------------------- | --------------- |
| `autoPageview` | Every page load                                          | `pageview`      |
| `autoClicks`   | Clicks on links, buttons, and `[role="button"]` elements | `click`         |
| `autoForms`    | Form submissions                                         | `form_submit`   |
| `autoScroll`   | Scroll depth at 25%, 50%, 75%, and 90%                   | `scroll`        |

Full details: [Auto-Tracked Events](/conversion-tracking/browser/auto-tracking)

## Custom events

Beyond auto-tracking, you can send any event from your JavaScript code:

```javascript theme={null}
scanova('track', 'cta_click', { button: 'Start Free Trial' });
```

Full details: [Custom Events](/conversion-tracking/browser/custom-events)

## Requirements

* A website where you can edit the HTML `<head>` section or add a tag via Google Tag Manager
* A tracking site created in **Integrations → Conversion Tracking** with your domain added to **Allowed Domains**
* The `site_id` from the dashboard

## Before you install

Make sure:

* [ ] Your tracking site is created in the dashboard
* [ ] Your website's domain is listed under **Allowed Domains** for that site
* [ ] You know where to add a `<script>` tag (HTML template, CMS header section, or GTM)
* [ ] QR Codes are linked to this tracking site in the Scanova dashboard

## Next steps

<CardGroup cols={2}>
  <Card title="Install the SDK" icon="download" href="/conversion-tracking/browser/install">
    Add the snippet directly or via Google Tag Manager.
  </Card>

  <Card title="SDK Configuration" icon="sliders" href="/conversion-tracking/browser/sdk-configuration">
    All init options explained with defaults and examples.
  </Card>

  <Card title="Auto-Tracked Events" icon="bolt" href="/conversion-tracking/browser/auto-tracking">
    See what data each auto-tracking feature captures.
  </Card>

  <Card title="Custom Events" icon="sparkles" href="/conversion-tracking/browser/custom-events">
    Track specific actions in your JavaScript code.
  </Card>
</CardGroup>
