Install the tracker
SnowAnalytics tracks your website with a single small script, sa.js. It's lightweight,
loads without blocking the page, and starts reporting page views the moment it
runs.
The snippet
SnowAnalytics gives you the snippet in the Install step when you add a site. Until your first visit arrives, it's also under Install script in the setup checklist on Overview. It looks like this:
<!-- SnowAnalytics -->
<script defer src="https://api.snowanalytics.app/sa.js" data-site="YOUR_SITE_ID" data-mode="cookieless" data-domain="example.com" data-collect="engaged,scroll,clicks"></script>| Part | Meaning |
|---|---|
src | Your collector's sa.js URL. SnowAnalytics fills this in for you. |
defer | Lets the page finish loading first, so tracking never slows your site down. |
data-site | Required. Your Site ID. Without it, the script does nothing. |
data-mode | cookieless, or attribution for Standard mode, which uses a first-party cookie. See Privacy modes. |
data-domain | Your domain. In Standard mode, it lets one visitor keep the same identity across your subdomains. |
data-collect | Extra data to capture: engaged time, scroll depth and clicks, for engagement and heatmaps. |
data-track-errors | Optional. Reports browser errors and web vitals. See error tracking. |
data-record | Optional. Records sessions so you can watch them back. See session replays. |
Replace https://api.snowanalytics.app and YOUR_SITE_ID with the values from
your own dashboard. The snippet SnowAnalytics shows you already has them filled in.
Where to put it
Add the snippet to the <head> of every page you want to track. A few tips:
- Add it once, site-wide. Use your template, layout, or your site builder's "header / custom code" box so it appears on every page rather than pasting it per-page.
<head>is preferred so the script is ready as early as possible, but anywhere on the page works.- Don't add it twice. SnowAnalytics guards against double-initialization, but a single copy keeps things clean.
For step-by-step instructions tailored to your stack (Next.js, WordPress, Webflow, Shopify, and more), see the Install Guides.
What gets tracked automatically
Once the snippet is on your page, SnowAnalytics records the following with no extra code:
- Page views, including in single-page apps when the route changes (see Single-page apps).
- Where the visit came from: referrer and any
utm_*/ref/source/viaparameters on the URL. - Device & browser, derived from the request on the server.
- Approximate location (country, city), derived from the visitor's IP on the server, never stored on their device.
To track actions like sign-ups or purchases, add custom events.
Optional attributes
A few more data-* attributes cover advanced setups:
| Attribute | Purpose |
|---|---|
data-api-url | Send events to a specific URL, used with the ad-blocker fix. |
data-honor-dnt="false" | Count visitors whose browser sends Do Not Track or Global Privacy Control. By default SnowAnalytics skips them. |
See the full Script configuration reference for details and defaults.
Confirm it's working
- Open your website in a new tab.
- In the dashboard, the live count in the top bar should show you within a few seconds. A new site's setup checklist ticks off See your first visit.
- Still nothing? View your page source and confirm
sa.jsis present, check thedata-sitevalue, and see Troubleshooting.