# Install the tracker

> Plaintext version for LLMs. Canonical HTML: https://askbowtie.com/docs/install/

You've added your site. One line left: paste your tag into your site's HTML `<head>` so it loads on every page, then open your dashboard and check it's live. It's the same one line for every platform.

```html
<script src="https://askbowtie.com/bowtie.js" data-token="your-claim-token" async></script>
```

That `data-token` is a placeholder. Your line carries a token unique to your site, and it is what proves the site is yours, so copy the real one from your dashboard at https://askbowtie.com/app/ . A tag installed without it still sends events, but the site stays unverified and MCP will return nothing for it. Put it just before the closing `</head>` tag, or anywhere inside the `<head>`.

## Pick your setup

Every method drops the same one line onto every page.

### Plain HTML or a codebase you edit
Static sites, custom templates, any framework.
1. Open the layout/template shared by every page (layout.html, base.html, header.php, or your theme header).
2. Find the closing `</head>` tag.
3. Paste the snippet just before it. Deploy.

React, Vue, Next.js, and other SPAs: put the tag in your root layout head (Next.js app router: app/layout; plain React/Vite: index.html). The tracker follows client-side route changes automatically, so one tag covers every route.

Wix, Squarespace, Webflow: use the built-in custom-code box (Settings, then custom code or code injection), paste into the Head, load on all pages.

### WordPress
Easiest, a header plugin:
1. Install and activate WPCode (or "Insert Headers and Footers").
2. Open WPCode, then Header & Footer.
3. Paste the snippet into the Header section. Save.

Or your theme: add it to header.php just before the closing `</head>` tag (use a child theme). Your own logged-in WordPress browsing is excluded automatically.

### Shopify
1. Online Store, then Themes.
2. On your live theme: three-dots menu, then Edit code.
3. Open theme.liquid, find the closing `</head>` tag.
4. Paste the snippet just before it. Save. It then loads on every storefront page.

### Google Tag Manager
1. Tags, then New.
2. Tag Configuration: Custom HTML, paste the snippet.
3. Triggering: All Pages.
4. Save, then Submit to publish.

### Cloudflare
Zaraz (recommended):
1. Cloudflare dashboard, your domain, then Zaraz, then Tools.
2. Add a tool, choose Custom HTML, paste the snippet.
3. Trigger on all page views. Save and publish.

Zaraz loads the tag off your main thread, out of your critical path, changeable from the dashboard with no code deploy.

## Then check it's working

Once the tag is live, open your askbowtie dashboard (https://askbowtie.com/app) and hit "check my site". It fetches your homepage and confirms the tag is served. Your first visitors start showing up from there.

Not detected yet? Confirm the tag is in your served HTML (View Source, search for bowtie.js), that it's on the page you registered, and that you've deployed. Then check again.

## The honest facts

- Size: a 9.8 KB loader on the critical path. Everything else loads async and never blocks rendering.
- Cookies: none. The tracker is cookieless.
- Privacy: it never captures names, emails, form fields, or the text people click, and it doesn't store visitor IP addresses.
- Your data: each site's data lives in its own database.
- Removal: delete the one line. That's the whole uninstall.

## For AI agents

Building with a coding agent? Hand it this:

```
Add this exact script tag to the shared layout that loads on every page,
just before the closing </head>. Copy it from the askbowtie dashboard rather
than from here: the data-token is unique to this site and is what proves the
site is ours. Keep it exactly as the dashboard gives it, and change nothing else.
<script src="https://askbowtie.com/bowtie.js" data-token="your-claim-token" async></script>
```

Once data is flowing, your agent can query it all over MCP: errors, analytics, organic search, and paid.

Starting from zero? Create your account (https://askbowtie.com/login) and add your domain first, then come back here.

## Conversions that happen on your server

If your conversions fire from a backend, a redirect gateway or a payment webhook, the tracker alone cannot join them to the visit that caused them. Post the page view from your backend as well, under one id you own, and the join is exact: [server-side sessions](/docs/server-side/).
