Documentation

Up and running in two minutes.

1. Install the script

Add this single tag to the <head> of every page you want to measure. Replace yourdomain.com with the domain you registered in your dashboard.

<script defer data-domain="yourdomain.com"
  src="https://abacuslytics.com/abacus.js"></script>

2. Custom events

Track goals like signups or purchases by calling the global window.abacus() function with an event name.

<button onclick="window.abacus('signup')">Sign up</button>

3. Single-page apps

The script automatically hooks into the History API, so client-side route changes in React, Vue, Svelte and friends are counted as pageviews — no extra setup needed.

Excluding traffic

  • Yourself: run localStorage.abacus_ignore = 'true' in your browser console to stop counting your own visits.
  • Paths: add data-exclude="/admin/*,/preview" to the script tag to skip matching paths.
  • Localhost is ignored by default. Add data-allow-local to override.

Privacy

Abacus stores no cookies and no IP addresses. Unique visitors are counted using a salted hash that rotates every day and can't be reversed or used to follow anyone across sites — which is why no consent banner is required.