---
title: Install the script
description: Add the tracking snippet to your website.
aliases: [snippet, tracking code, site ID, buoy.js, analytics.js, Do Not Track]
---

Every website has its own snippet. Find it under **Websites**, your website, **Settings**, **Tracking snippet**. It looks like this, with your site ID in place of `YOUR_SITE_ID`:

```html
<script defer src="https://cdn.blueradar.net/buoy.js" data-site="YOUR_SITE_ID"></script>
```

Paste it before the closing `</head>` tag on every page. Keep `defer`.

## Your platform

:::tabs
::tab[HTML]
Paste the snippet before `</head>` on every page, or in the layout every page shares.
::tab[WordPress]
**Appearance**, **Theme file editor**, `header.php`. Paste the snippet before `</head>`.
::tab[Shopify]
**Online Store**, **Themes**, **Edit code**, `theme.liquid`. Paste the snippet before `</head>`.
::tab[Webflow]
**Site settings**, **Custom code**, **Head code**. Paste the snippet, then publish.
::tab[Next.js]
In the root layout, `app/layout.tsx`, inside `<head>`:

```tsx
<head>
  <script defer src="https://cdn.blueradar.net/buoy.js" data-site="YOUR_SITE_ID"></script>
</head>
```
::tab[Nuxt]
In `nuxt.config.ts`:

```ts
export default defineNuxtConfig({
  app: { head: { script: [{ src: "https://cdn.blueradar.net/buoy.js", defer: true, "data-site": "YOUR_SITE_ID" }] } },
})
```
:::

## Check it works

Visit a page on your site. The website's **Settings** tab says **Waiting for the first pageview** until one arrives, usually within a minute or two. Then the **Report** tab fills in.

## Single-page apps

Pages your app opens with `history.pushState`, and back and forward, count as pageviews. Nothing else to set up.

## Do Not Track

There are two scripts. They differ in one thing:

| Script | Visitors whose browser sends Do Not Track |
| --- | --- |
| `buoy.js` | Not counted: no pageviews, events or A/B |
| `analytics.js` | Counted |

`buoy.js` is the default. To count every visitor, for example on an internal tool, load `analytics.js` instead:

```html
<script defer src="https://cdn.blueradar.net/analytics.js" data-site="YOUR_SITE_ID"></script>
```

In **Settings**, **Count visitors with Do Not Track on** gives you this snippet.

Neither script sets cookies.
