Install Statsdot on any website
Updated October 14, 2026
Statsdot needs one line of code on every page you want to measure.
1. Add your site
Sign in, open Sites, type your domain (for example yoursite.com) and press Add site. You will see your snippet.
2. Paste the snippet in the head
Copy it into the <head> of every page, ideally in the template or layout your pages share:
<script defer data-domain="yoursite.com" src="https://statsdot.com/js/script.js"></script>
data-domainmust be the domain you added, withouthttps://orwww.- Each subdomain is a separate site.
www.yoursite.comcounts asyoursite.com, but visits toblog.yoursite.comare ignored until you addblog.yoursite.comas its own site and use that domain in its code. deferlets the page load first; the script is under 1 KB compressed.
3. Check that it works
Open your site in a normal browser window and look at your dashboard: within a few seconds the counter of visitors on the site right now shows you.
Visits from localhost are ignored on purpose. To leave your own visits out of the numbers, open the browser console on your site once and run:
localStorage.setItem('statsdot_ignore', '1')
Single-page apps
Statsdot follows navigation done with the browser's history API, so React, Vue, Svelte, Next.js, Nuxt, Livewire and similar frameworks are counted page by page without extra code.
Custom events
Count any action with one line of JavaScript, with an optional label:
window.statsdot.track('Signup')
window.statsdot.track('Signup', 'Yearly plan')
Without code, add data-statsdot-event="Signup" to a button, a link or a form. To see the conversion rate of an event, add it as a goal in the site's Settings (the cog next to the dates). More in Events and goals.
Outbound links and downloads
Clicks on links to other websites and on files such as PDF, ZIP or DOCX are counted automatically as Outbound Link and File Download events. To turn this off, add data-auto="false" to the script tag.
Campaigns
Add UTM tags to the links you share and Statsdot shows them under Sources:
https://yoursite.com/offer?utm_source=newsletter&utm_medium=email&utm_campaign=autumn