# Install Foresite on Eleventy

Paste your Foresite line into the `<head>` of the base layout your pages use, often `_includes/layouts/base.njk`:

```html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>{{ title }}</title>
    <script defer src="https://t.foresite.dev/s/YOUR_SITE_ID.js"></script>
  </head>
  <body>
    {{ content | safe }}
  </body>
</html>
```

Use the line from your own dashboard (**Settings → Install**). If some pages use a different layout, add it there too, or have that layout extend the base one.

Visits to `localhost` aren't counted, so `npx @11ty/eleventy --serve` won't add test traffic. After you deploy, the **Installation Check** in **Settings → Install** turns green with the first pageview.
