What it does
This tool writes the script tag that installs atrby, privacy-first web analytics that counts visitors without cookies by default and shows which sources bring paying customers. It's one line and loads with defer, so it never blocks your page.
Cookieless is the default and the right choice for most sites. Cookie mode recognises returning visitors across days, but in the EU and UK it needs consent first.
How to use it
- 1Enter your key in Site ID. It starts with st_ and is in atrby under Site settings. Left empty, the snippet uses YOUR_SITE_ID.
- 2In Mode: cookieless|cookie, type cookie for cookie mode. Anything else, or nothing, gives cookieless.
- 3Press Run, then Copy to take the script tag.
- 4Paste it into the head of every page and open your site. Your first visit shows up within a minute.
Where to paste it
Put it in the head of every page: your shared header template, or the custom code setting in WordPress, Webflow, Shopify or Google Tag Manager. In Next.js, use the Script component in the root layout.
Single-page apps need nothing extra. The script records a pageview on every history.pushState and back or forward navigation. Events are accepted only from your domain and its subdomains; add staging hosts in Site settings.
Cookieless or cookie mode
In cookieless mode, nothing is kept on the device apart from a visit id in sessionStorage that ends when the tab closes. Unique visitors are counted with a hash of a daily random salt, your site, the IP address and the user agent. The IP is never stored, so one person on two days counts as two visitors.
Cookie mode adds data-cookie="true", and the script keeps a first-party cookie, atrby_vid, for a year. It only takes effect once the site is also set to cookie mode in Site settings, under Install and privacy. Where consent is required, load it only after the visitor agrees.
Questions
Do I need a cookie banner with this snippet?
In cookieless mode atrby sets no cookies and no long-lived storage. It keeps one random visit id in sessionStorage, deleted when the tab closes, to tie a visit's pages together. Many sites run it without a banner, but whether that needs consent where your visitors are is a question for your own counsel. Cookie mode needs consent in the EU and UK.
Will the script slow my site down?
It loads with defer, so the browser fetches it alongside the page and runs it after the HTML is parsed. It never blocks rendering.
Is it safe to publish my site ID?
Yes. It's a public key that appears in your page source, and events are accepted only from your own hostnames.
Does it work with WordPress, Shopify or Webflow?
Yes. It's a standard script tag; paste it wherever the platform lets you add code to the head of every page.