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

# HTML

> Add Bily to a plain HTML site with one exact browser script.

Add Bily to a plain HTML site with one script. Each time the browser loads a document, Bily records its page view automatically.

## Add Bily once

Select your store. Then open **Bily > Settings > Apps > More settings > Install tracking**, choose **HTML**, and copy the provided script into your site's global `<head>`.

```html index.html theme={null}
<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Everyday Store</title>
    <script
      src="https://tracking.example.com/b.js?shop=store.example.com"
      referrerpolicy="strict-origin-when-cross-origin"
    ></script>
  </head>
  <body>
    <h1>Everyday Store</h1>
  </body>
</html>
```

<Warning>
  Use the exact `src` value from Bily. Do not shorten it, add a path, remove query parameters, or decode encoded characters.
</Warning>

## Load it once per document

For a templated site, place the script in the shared layout. Do not add another copy to individual pages.

The script records the initial `PageView` for every full document load. Do not send that page view manually.

## Switch when your site becomes an app

This HTML installation does not include the `@bilyai/js` application API. If your site becomes a single-page application, remove the raw script and follow the [JavaScript](/sdk/javascript), [React](/sdk/react), or [Next.js](/sdk/nextjs) guide.

## Keep your content security policy

If your policy requires a script nonce, add the server-generated nonce to the script element. Keep the `src` unchanged.

```html theme={null}
<script
  nonce="SERVER_GENERATED_NONCE"
  src="https://tracking.example.com/b.js?shop=store.example.com"
  referrerpolicy="strict-origin-when-cross-origin"
></script>
```

<Card title="Verify the installation" icon="circle-check" href="/guides/verification">
  Confirm one initial page view and one script request for each document.
</Card>
