Free analytics · hosted or self-hosted · open source

The open-source Google Analytics alternative that knows which traffic is real

PVUV.ai is a self-hosted, open-source Google Analytics (GA4) alternative. Beyond PV/UV, it scores every visit for authenticity, catches invalid traffic and bots that only reveal themselves in aggregate, and loads ad code only for traffic it trusts. Runs on Cloudflare’s edge — use the free hosted version, or self-host the open-source build.

  • 100% open source · AGPL-3.0
  • Free hosted or self-host
  • Privacy-friendly by default

An open-source Google Analytics alternative you fully control

100% open source

AGPL-3.0 and public on GitHub — audit every line, fork it, run your own build. No black box, no lock-in.

Hosted or self-hosted

Use the free hosted version with zero setup, or self-host the open-source build on your own Cloudflare Workers + D1. The analytics is free either way.

A GA / GA4 alternative

Privacy-friendly, lightweight, cookieless-capable — plus invalid-traffic detection Google Analytics never gave you.

Why PVUV.ai over Google Analytics (GA4)

Most analytics tools — Google Analytics (GA4) included — count traffic but treat every request as real. Sites that monetize with ads are exposed to invalid-traffic penalties they can't see coming. PVUV.ai is the open-source alternative that treats traffic quality as a first-class metric — so you can tell real visitors from bots, see where bad traffic comes from, and act on it.

Three capabilities, one lightweight stack

Full-dimension web analytics, layered invalid-traffic detection, and optional ad-fraud protection — open source, self-hosted, and served from Cloudflare's edge with no server to run.

Full-dimension analytics

  • Per-page PV/UV across multiple sites & subdomains
  • Referrers, full UTM, and every click param (gclid, fbclid, ttclid, msclkid…)
  • Engagement-based bounce rate (GA4-style) and true dwell time
  • Custom events with revenue, auto-converted to USD
  • Session- & user-level path attribution, cross-device merge

Invalid-traffic detection

  • Client signals — headless/automation traits, environment contradictions, WebGL/canvas, honeypots
  • Session features — inter-page timing, path patterns, interaction presence
  • Population statistics — fingerprint/IP-segment clusters, distribution tests, cross-site detection
  • Every hit carries a 0–100 score, a verdict, and a bit-flag of fired signals

Ad protection (optional)

  • Progressive verdict: fast first-page decision, accurate blocking from page two
  • Loads ad code only for trustworthy traffic — never modifies the ad script itself
  • Fail-open by design: any error defaults to loading ads, never costing revenue
  • Owner-controlled thresholds with a shadow (record-only) mode
AI analysis · paid add-on

Scheduled and on-demand reports: data anomaly → attribution → actionable recommendations.

PVUV.ai vs Google Analytics, Plausible, Matomo & Umami

They all do web analytics. Only PVUV.ai scores every visit for authenticity, flags invalid traffic and bots, and can gate your ads — which is exactly why it’s the Google Analytics alternative for sites that run on ad revenue.

  • Invalid-traffic & bot detection
  • Ad-fraud protection
  • Serverless on Cloudflare — no database
  • 100% open source
  • Free hosted or self-host
PVUV.aiGoogle Analytics (GA4)PlausibleMatomoUmami
Open source (AGPL-3.0)
Self-hosted — you own the data
Serverless — no database to run CloudflareSaaS
Invalid-traffic & bot detection
Ad-fraud protection
Privacy-first (cookieless, hashed IPs)Limited
PriceFree — hosted or self-hostFree, sampledPaid cloud / free self-hostFree self-host / paid cloudFree self-host

Every tool measures traffic. PVUV.ai is the only one that also tells real visitors from bots and protects your ad revenue — while running serverless on your own Cloudflare account.

Bad traffic that only shows up in aggregate

A single request can look perfectly human. The same hand behind thousands of them cannot. PVUV.ai stitches three layers of evidence — and shows its work.

01

Single point — client signals

Automation traits, environment contradictions, canvas/WebGL, honeypots — captured in the SDK, scored server-side.

02

Stitching — session features

Mechanical equidistant page intervals and abnormally regular paths get flagged as evidence accumulates in-session.

03

Batch — population statistics

A daily pass finds fingerprint/IP clusters and distribution anomalies, then re-verdicts: “this fingerprint links N visitors across M sites.”

Framed with restraint: verified crawlers are classified separately, “suspect” is shown amber (uncertain, not confirmed), and re-verdict authority stays with the platform — so the data behind ad protection keeps its meaning.

Architecture

An edge pipeline: collect → validate & score → queue → batch-write → roll up → analyze → loop back a fresh verdict.

Domain split — the exposed subdomains embedded on measured sites (js, in) are isolated from the internal ones (api, apex console). If an exposed subdomain ever hits a blocklist, your dashboards and queries stay unaffected.

Cloudflare suite
  • Workers
  • D1 monthly-partitioned events
  • Queues spike buffering
  • KV blocklist · config
  • Cron Triggers
  • R2 optional archive

No external database. No server to run.

Privacy by design

PVUV.ai is built to minimize what it stores. Authenticity signals are used for scoring, not for cross-site visitor profiling.

Hashed IPs only

IP is stored only as a truncated hash (plus a /24 segment hash), never in plaintext.

No raw fingerprints

Device fingerprints are stored as hashes and conclusions only — never raw values — and used solely for authenticity scoring.

Coarse sensor signals

Mobile-sensor signals are coarse booleans only — no raw streams, no sensor fingerprint — and can be turned off.

Deployer responsibility: in GDPR/ePrivacy jurisdictions, fingerprinting and sensor signals may require user consent. The project ships data-minimizing defaults and opt-out toggles; each deployer is responsible for compliance in their own jurisdiction.

Quick start

Want zero setup? Use the free hosted version. Prefer full control? Self-host PVUV.ai on your own Cloudflare account — free and open source — then drop one script tag on any site.

Deploy on Cloudflare
# 1. Clone & install
git clone https://github.com/qiayue/pvuv.ai.git
cd pvuv.ai && npm install

# 2. Create edge resources
wrangler d1 create pvuv
wrangler kv namespace create BLOCKLIST
wrangler queues create INGEST_QUEUE

# 3. Schema + deploy
wrangler d1 execute pvuv --file=./shared/schema.sql
wrangler deploy --config workers/ingest/wrangler.toml
Add it to a site
<!-- register a site to get your site_id -->
<script defer
  src="https://js.pvuv.ai/f.js"
  data-site="YOUR_SITE_ID"
  data-adguard="balanced"
  data-adclient="ca-pub-xxxxxxxx">
</script>

Optional: data-spa, data-exclude, data-sensors="off", or point data-api at a first-party reverse proxy.

Roadmap

Under active development toward the first deployable milestone. Interfaces and schema may change before a tagged release.

  1. M1 first deployable

    SDK + ingest + fast verdict + D1 schema + minimal console (PV/UV, sources, top pages, traffic-quality overview).

  2. M2

    Sessions/dwell/bounce, full UTM, rollup acceleration, population analysis + blocklist loop, shadow mode, reverse-proxy option.

  3. M3

    identify + custom events + revenue + funnel attribution, distribution tests + baseline anomalies.

  4. M4

    AI reports, full anti-fraud, external ranking integration, human-review UI.

Frequently asked questions

Do I have to self-host PVUV.ai, or is there a hosted version?

There is a free hosted version — sign in at pvuv.ai and start measuring in minutes, with no setup. Prefer full control? Self-host the open-source build on your own Cloudflare account. The analytics is free both ways; only the optional AI analysis and recommendations are a paid add-on.

Is PVUV.ai a free, open-source Google Analytics alternative?

Yes. All the analytics is free — traffic stats, invalid-traffic detection and ad protection — whether you use the free hosted version at pvuv.ai or self-host the open-source (AGPL-3.0) build. Only the optional AI analysis and recommendations are a paid add-on.

How is PVUV.ai different from Google Analytics (GA4)?

Beyond PV/UV and standard web analytics, PVUV.ai scores every visit for authenticity, detects invalid traffic and bots that only reveal themselves in aggregate, and can protect your ad revenue — capabilities GA4 does not offer. It is also privacy-friendly and needs no cookies.

Can I self-host PVUV.ai?

Yes. PVUV.ai runs entirely on Cloudflare Workers + D1 in your own account — no external database and no server to maintain. You can be collecting data right after deploying a few Workers.

Is PVUV.ai privacy-friendly and GDPR-conscious?

It is built to minimize what it stores: IPs are hashed and never kept in plaintext, fingerprints are stored as conclusions only, and mobile-sensor signals are coarse booleans you can switch off. As the deployer you stay in control of compliance.

Does PVUV.ai replace Google Analytics for ad-supported sites?

Yes — it is designed for sites that monetize with ads. On top of analytics, its invalid-traffic detection and optional ad protection help keep bots from dragging down your ad accounts.

Free analytics you can trust — hosted or self-hosted.

Open-source under AGPL-3.0. Self-host and modify freely — if you run a modified version as a network service, offer its source to your users.

Powered by pvuv.ai · open source