Install the script
Add the tracking snippet to your website.
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:
<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
Paste the snippet before </head> on every page, or in the layout every page shares.
Appearance, Theme file editor, header.php. Paste the snippet before </head>.
Online Store, Themes, Edit code, theme.liquid. Paste the snippet before </head>.
Site settings, Custom code, Head code. Paste the snippet, then publish.
In the root layout, app/layout.tsx, inside <head>:
<head>
<script defer src="https://cdn.blueradar.net/buoy.js" data-site="YOUR_SITE_ID"></script>
</head>
In nuxt.config.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:
<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.