# Install Peeko (/install)



Peeko is one script tag. It sets no cookie, so there is nothing to ask consent for, and it needs no
configuration once it is on the page.

```html
<script defer src="https://usepeeko.com/t.js" data-site="YOUR_SITE_KEY"></script>
```

Every key on this page is a placeholder. Your real key is filled in for you the moment you create a
site: it is in the install card on your dashboard, in the prompt the command line prints, and in
what `create_site` hands your agent.

The prompts below are the short form. Once you have an API key, the install card and the command
line print a longer one that also connects [MCP](/mcp) in the same paste, so the agent that installs
the tracker can read the numbers afterwards.

## Pick what you build with [#pick-what-you-build-with]

<Tabs items="['Lovable', 'v0', 'Bolt', 'Cursor', 'Claude Code', 'Codex', 'Next.js', 'Plain HTML']">
  <Tab value="Lovable">
    Paste the prompt into the chat and let it edit the project, then publish as usual.

    ```text
    Install Peeko analytics on this site: add `<script defer src="https://usepeeko.com/t.js" data-site="YOUR_SITE_KEY"></script>` to the head of every page.
    ```
  </Tab>

  <Tab value="v0">
    Paste the prompt into the chat, then deploy the project as usual.

    ```text
    Install Peeko analytics on this site: add `<script defer src="https://usepeeko.com/t.js" data-site="YOUR_SITE_KEY"></script>` to the head of every page.
    ```
  </Tab>

  <Tab value="Bolt">
    Paste the prompt into the chat, then deploy the project as usual.

    ```text
    Install Peeko analytics on this site: add `<script defer src="https://usepeeko.com/t.js" data-site="YOUR_SITE_KEY"></script>` to the head of every page.
    ```
  </Tab>

  <Tab value="Cursor">
    Paste the prompt into the chat pane with the project open.

    ```text
    Install Peeko analytics on this site: add `<script defer src="https://usepeeko.com/t.js" data-site="YOUR_SITE_KEY"></script>` to the head of every page.
    ```
  </Tab>

  <Tab value="Claude Code">
    Paste the prompt into the terminal with the project open.

    ```text
    Install Peeko analytics on this site: add `<script defer src="https://usepeeko.com/t.js" data-site="YOUR_SITE_KEY"></script>` to the head of every page.
    ```
  </Tab>

  <Tab value="Codex">
    Paste the prompt into the session with the project open.

    ```text
    Install Peeko analytics on this site: add `<script defer src="https://usepeeko.com/t.js" data-site="YOUR_SITE_KEY"></script>` to the head of every page.
    ```
  </Tab>

  <Tab value="Next.js">
    Put the tag in the root layout, so every route carries it.

    ```tsx
    export default function RootLayout({ children }: { children: React.ReactNode }) {
      return (
        <html lang="en">
          <head>
            <script defer src="https://usepeeko.com/t.js" data-site="YOUR_SITE_KEY" />
          </head>
          <body>{children}</body>
        </html>
      );
    }
    ```

    A plain script tag is enough. `next/script` also works: it sets `document.currentScript` to null,
    and the tracker falls back to finding its own tag by its `data-site` attribute.
  </Tab>

  <Tab value="Plain HTML">
    Paste the tag before the closing head tag of every page you want to measure.

    ```html
    <head>
      <title>Your site</title>
      <script defer src="https://usepeeko.com/t.js" data-site="YOUR_SITE_KEY"></script>
    </head>
    ```
  </Tab>
</Tabs>

Once it is live, open your own site with `?me=1` to tag that browser as yours. Tagged visits are
badged **You** wherever visitors are listed, and they are left out of every number unless you turn
on **Count my own visits** in your site settings.

## Check that it arrived [#check-that-it-arrived]

The ingest endpoint answers `204` to every well formed beacon, whether or not the key is real, so
this proves the request reached Peeko and nothing more. Use it when a visit is not showing up and
you want to know which side of the network the problem is on.

```bash
curl -sS -o /dev/null -w "%{http_code}\n" -X POST "https://usepeeko.com/a" -H "content-type: application/json" --data '{"k":"YOUR_SITE_KEY","p":"/pricing","r":"https://news.ycombinator.com/","sw":1512,"sh":982,"vw":1512,"vh":860,"cs":"dark"}'
```

## Three files AI crawlers ask for [#three-files-ai-crawlers-ask-for]

Peeko tells you when a crawler asked for one of these and got a 404. None of them is required, and
each takes a minute.

### /llms.txt [#llms-txt]

A plain text summary of your site for a language model: what it is, and links to the pages worth
reading. It is a proposed convention rather than a standard, so nothing breaks without it, and
several crawlers now look for it. Write it in Markdown and serve it at the root of the site.

Peeko serves its own at [usepeeko.com/llms.txt](https://usepeeko.com/llms.txt), and most of the
pages it indexes are available as Markdown beside them. It is a working example you can copy the
shape of.

### /sitemap.xml [#sitemap]

The list of pages you want found. On Next.js, export a `sitemap` function from `app/sitemap.ts` and
the framework serves it for you. On a static site, generate it at build time. List only pages you
are happy to have indexed.

### /robots.txt [#robots-txt]

Who may crawl what. One thing worth knowing before you add one is that a robots.txt served by your
own site **replaces** whatever your CDN was serving rather than adding to it, so read the live file
before and after.

If you want to say something about AI in particular, a Content-Signal line states whether your pages
may be used for search, for answers and for training. Leaving one of the three out means neither
granted nor restricted, which is weaker than saying no.

```text
User-Agent: *
Content-Signal: search=yes, ai-input=yes, ai-train=no
Allow: /
```

## Next [#next]

* [The command line](/cli) reads the same numbers with no browser.
* [MCP](/mcp) gives the same reads to your agent as tools.
