Open Source • Privacy First

VNOC Analytics

Lightweight, multi-domain website analytics powered by Cloudflare Workers. No cookies, no tracking pixels, GDPR compliant out of the box.

Edge-Powered

Runs on Cloudflare Workers with D1 database. Sub-millisecond latency, globally distributed.

🌐

Multi-Domain

Track unlimited domains from a single worker instance. Switch between sites in the dashboard.

🔒

Privacy-Friendly

No cookies. Daily-rotating visitor hashes. No personal data stored. GDPR compliant by default.

📦

~1.8KB Tracker

Ultra-lightweight npm package or script tag. SPA-aware with History API patching.

📊

Real-time Dashboard

Live visitors, traffic charts, top pages, referrers, countries, devices, and browsers.

🔌

JSON API

Full REST API to query stats programmatically. Build custom dashboards or integrations.

Installation Guide

Step 1: Install the Tracker

Choose your preferred method to add tracking to your site.

npm install vnoc-analytics
import { init } from 'vnoc-analytics';

init({
  endpoint: 'https://your-worker.workers.dev'
});
<script
  src="https://your-worker.workers.dev/tracker.js"
  data-endpoint="https://your-worker.workers.dev"
  defer
></script>

For emails or no-JS environments, use a tracking pixel:

<img src="https://your-worker.workers.dev/pixel.gif?d=example.com&p=/page" width="1" height="1" />

Step 2: Configure Options (Optional)

init({
  endpoint: 'https://your-worker.workers.dev',
  domain: 'example.com',    // Override auto-detected domain
  autoTrack: true,           // Auto-track on page load (default: true)
  trackSPA: true,            // Track SPA route changes (default: true)
  honorDNT: false            // Respect Do Not Track header (default: false)
});

Step 3: View Your Stats

Sign in to the dashboard below with your API key. Stats appear within seconds of adding the tracker to your site.

API Reference

All endpoints require Authorization: Bearer YOUR_API_KEY header. Periods: 24h, 7d, 30d, 90d

EndpointDescription
GET /api/stats?domain=X&period=7dOverview with timeseries chart data
GET /api/stats/realtime?domain=XActive visitors (last 5 minutes)
GET /api/stats/pages?domain=XTop pages ranked by views
GET /api/stats/referrers?domain=XTraffic sources / referrers
GET /api/stats/countries?domain=XVisitor country breakdown
GET /api/stats/devices?domain=XDesktop / mobile / tablet split
GET /api/stats/browsers?domain=XBrowser breakdown
GET /api/domainsList all tracked domains
POST /api/domainsRegister a new domain

Access Dashboard