# Install on a plain HTML site

> For the complete documentation index, see [llms.txt](https://analytics.writechoice.io/docs/llms.txt).

Add the snippet to the head of every page of a hand-written site, a static site generator, a CMS theme or a site builder.

Use this guide for any site where you can edit the page `<head>`: hand-written HTML, a static site generator, a CMS theme, or a site builder with a "custom code" setting.

**1. Copy the line**

In the portal, open **Settings → Install** and copy the line under **HTML**. It looks like this, with your own site key:

```html
<script defer src="https://analytics.writechoice.io/s/YOUR_SITE_KEY.js"></script>
```

**2. Paste it in the head of every page**

Paste it inside the `<head>` of **every page** of the site. If your site uses a shared layout or template, add it there once:

```html
<head>
  <meta charset="utf-8" />
  <title>My site</title>
  <script defer src="https://analytics.writechoice.io/s/YOUR_SITE_KEY.js"></script>
</head>
```

**3. Publish the site**

Then [check that it works](https://analytics.writechoice.io/docs/install/#check-that-it-works).

## Notes

- Add the script only once per page. Loading it twice doesn't count visits twice, but there's no reason to.
- Keep the `defer` attribute, so the script never delays your page.
- The same line works on every domain and subdomain where you place it. The domain registered for the site doesn't restrict where the script runs; it's the address the **Heatmaps** tab uses for the page preview, so keep it set to the domain readers use.
- If your server sends `X-Frame-Options` or a `frame-ancestors` directive, the **Heatmaps** tab draws the clicks on a blank background. See [Heatmap preview](https://analytics.writechoice.io/docs/install/heatmap-preview/).

## Site search

If your site has a search box, call `wca.search` from your search code to record what readers look for. See [Site search](https://analytics.writechoice.io/docs/install/events-and-tags/#site-search).