resources/views/docs.stx:13:5: include error: Error loading include file site-nav: ENOENT: no such file or directory, open '/var/www/analyticshq-main/releases/063326a/resources/partials/site-nav.stx' ╭──────────────────────────────────────────────────────────────╮ │  ERROR  Include Error │ ╰──────────────────────────────────────────────────────────────╯ File: docs.stx (line 13, col 5) Message: Error loading include file site-nav: ENOENT: no such file or directory, open '/var/www/analyticshq-main/releases/063326a/resources/partials/site-nav.stx' Context:  11: 12: > 13: resources/views/docs.stx:31:38: include error: Error loading include file site-nav: ENOENT: no such file or directory, open '/var/www/analyticshq-main/releases/063326a/resources/partials/site-nav.stx' ╭──────────────────────────────────────────────────────────────╮ │  ERROR  Include Error │ ╰──────────────────────────────────────────────────────────────╯ File: docs.stx (line 31, col 38) Message: Error loading include file site-nav: ENOENT: no such file or directory, open '/var/www/analyticshq-main/releases/063326a/resources/partials/site-nav.stx' Context:  29: 30: > 31:
32:
33:

Install the script

 14: 15:

Docs

Ship analyticshq in one line.

One first-party script under 2 KB, a tiny client call for custom events, and a read API for your numbers. No cookies, no consent banner, and no SDK to learn.

Install the script

Add one tag to your site head with your site ID. It loads deferred and first-party, and starts counting page views right away, including client-side route changes in single-page apps.

Add to every page, once
<script defer
  src="https://analyticshq.org/script.js"
  data-site="YOUR_SITE_ID"></script>

Track custom events

Once the script has loaded it puts a analyticshq() function on the page. Call it on any event that matters, with optional properties, to record a conversion beside your traffic.

On the event that matters
// e.g. right after a successful signup
analyticshq('signup', {
  plan: 'pro',
  value: 19,
})

Read your numbers with the API

Every figure on the dashboard is available over a small read API, scoped to your site ID and an optional date range. Wire it into a status board, a scheduled report, or your own UI.

GET /api/sites/{siteId}/*
GET /api/sites/{siteId}/stats        // visitors, views, sessions
GET /api/sites/{siteId}/timeseries   // views per day
GET /api/sites/{siteId}/pages        // top pages
GET /api/sites/{siteId}/referrers    // top sources

// example
fetch('https://analyticshq.org/api/sites/demo/stats?from=2026-07-01&to=2026-07-10')
  .then(r => r.json())
// { "views": 8, "visitors": 4, "sessions": 4 }

Own your data, self-host if you want

Every event lands in your own PostgreSQL database, so the numbers never leave your infrastructure and there is no third party to trust. The whole stack is open source.

Start counting visitors, privately.

Add the script, watch the dashboard fill in. No cookie banner required.

╭──────────────────────────────────────────────────────────────╮ │  ERROR  Include Error │ ╰──────────────────────────────────────────────────────────────╯ File: docs.stx Message: Error loading include file site-footer: ENOENT: no such file or directory, open '/var/www/analyticshq-main/releases/063326a/resources/partials/site-footer.stx'