Install
Add one line to every page, in the <head>:
<script defer src="https://COLLECTOR/s/ans_YOUR_KEY.js"></script>Your exact line, with your site's key and our collector's address, is on Sites → your site → Install. The script is about 5 KB, loads without blocking the page, and counts pageviews straight away — including pages a single-page app shows without reloading. Within a minute Sites → Tracking health shows the first visit.
Calling the tracker before it has loaded is safe: add this once, above the script, and queue calls with dba(…).
<script>window.dba=window.dba||function(){(dba.q=dba.q||[]).push(arguments)}</script>Which pages count. Only the hostnames you list for the site send data; anything else is refused and shown in Tracking health. *.example.com takes every subdomain. Paths you exclude (Settings → Site → Exclude paths, globs like /admin/*) are never counted.
While you build. A page on localhost (or 127.0.0.1) is counted only when the site lists localhost among its hostnames, so your own work in progress never lands in a live site's numbers. A site that doesn't list it can still count one page there with data-local on its script tag.
Bots. Known crawlers and scripted browsers are never counted. A visit from a hosting network (a cloud provider or a server host) is counted when it looks like a browser, and left out of the charts when it doesn't; Realtime and Replays still show it.
Cookie banners. You don't need one for us: we count without a cookie. If your site asks visitors anyway, their yes lets us connect their visits across days, keep their experiment variant and record them. Add one line to what your banner runs when a visitor accepts (and the same with false when they decline or take it back):
(window.dba=window.dba||function(){(dba.q=dba.q||[]).push(arguments)})('consent', true)It works whether the banner runs before our script has loaded or after. A banner built on the IAB's framework (TCF v2, which most consent tools offer) needs no line at all: add data-consent="tcf" to our script tag (or init({ siteKey, consent: 'tcf' }) with the npm package) and we follow its "store and read on the device" choice. Our WordPress plugin follows the WP Consent API, and our Tag Manager template Google Consent Mode, by themselves.
Your own visits. Run DeltaAnalytics.optOut() once in your browser's console on your site, and that browser is no longer counted.
Google Tag Manager. Import our tag template (Templates → Tag Templates → New → ⋮ → Import), then add a tag of that type with your site key, fired on All Pages. It can follow Google Consent Mode (analytics_storage) for you and pass a signed-in person's id; a second tag of the same type sends custom events with properties and revenue.
React, Next.js, Vue, Svelte, Angular. npm install @deltabreen/analytics, then call init({ siteKey: 'ans_YOUR_KEY' }) once as the app starts; track, identify, consent, variant and flag are exported, and @deltabreen/analytics/react has an <Analytics siteKey="…" /> component with useVariant and useFlag hooks. It loads the same script and does nothing on a server.
WordPress and others. The same line works anywhere you can add a script tag; WordPress has its own plugin. For first-party loading through your own domain (recommended), see proxy.