Privacy-first, self-hostable web analytics. Own your data.
A lightweight, cookie-free Google Analytics alternative.
Live: https://analytics.irotechlab.xi.to
- Cookie-free, GDPR-friendly by default
- Under 2KB tracking script
- Realtime dashboard
- Custom events via window.iro.track()
- Auto-tracking of outbound links, downloads, UTM params
- Breakdowns: pages, referrers, countries, devices, browsers, OS, screens, languages
- Entry / exit pages
- Public shareable dashboards
- CSV export of raw events
- Self-hostable (MIT licensed)
- Powered by IrotechLab Auth (OIDC + PKCE)
Visit https://auth.irotechlab.xi.to/developer/new
- Client type: Confidential
- Scopes: openid, profile, email
- Redirect URIs:
Save your client_id and client_secret.
Same app page:
- URL: https://your-domain.com/api/webhooks/iro
- Events: user.authorized, user.revoked, user.revoked_all
Save the signing secret.
git clone https://github.com/IROTECHLAB/analytics
cd analytics
npm install
cp .env.example .env.localAPP_URL=http://localhost:3000
IRO_ISSUER=https://auth.irotechlab.xi.to
IRO_CLIENT_ID=iro_xxxxx
IRO_CLIENT_SECRET=iro_sk_live_xxxxx
IRO_WEBHOOK_SECRET=iro_whsec_xxxxx
DATABASE_URL=postgres://...
SESSION_SECRET=openssl rand -base64 32
ADMIN_USERNAME=admin
ADMIN_PASSWORD=your-passwordnpm run db:push
npm run devPush to GitHub, connect on Netlify, add the same env vars, deploy.
Add to your site's :
<script defer
data-site="iro_site_xxxxxxxxxxxx"
src="https://your-domain.com/script.js"
></script>That's it — pageviews start flowing.
window.iro.track('signup_complete', { plan: 'pro' });Auto-handled — hooks into pushState, popstate, and hashchange.
- Next.js 14 (App Router)
- TypeScript
- Tailwind CSS
- Neon Postgres + Drizzle ORM
- IrotechLab Auth (OIDC + PKCE)
- Recharts
- Netlify
Collect: page path, referrer host, timestamp, country (from CDN header), device type, browser, OS, screen bucket, language, UTM params.
Never collect: cookies, IP addresses, cross-site identifiers, personal data.
Visitor IDs rotate every 24 hours.
MIT — see LICENSE.
Built by IROTECHLAB.