Frameworks
Plain HTML
The base install for any static site or server-rendered page.
Any site that serves HTML can run Sift. Put the snippet in <head> on every
page.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Example</title>
<script
defer
data-domain="example.com"
src="https://sift.agentonboard.xyz/js/sift.js"
></script>
</head>
<body>
...
</body>
</html>Static site generators
If your generator has a shared layout or partial, put the tag there once. It is the same snippet for every page.
Common places to look:
| Generator | File |
|---|---|
| Astro | src/layouts/*.astro, inside <head> |
| Hugo | layouts/partials/head.html |
| Eleventy | _includes/base.njk or your layout file |
| Jekyll | _includes/head.html |
| SvelteKit | src/app.html, inside <head> |
| Nuxt | nuxt.config.ts, under app.head.script |
Single-page apps
If your site changes the URL without a full reload, Sift follows it automatically. See SPA routes for how that works and what it does not catch.
Multiple domains
One snippet tracks one data-domain. If you serve several domains from the same
HTML, render data-domain server-side per request, or install a separate site in
Sift for each domain.