About this project

WebVisitor is a simple web analytics service that runs on Cloudflare's serverless platform. It combines Cloudflare Workers for request handling, Hono as the web framework, and Cloudflare D1 (a SQLite-based serverless database) for storing analytics data. Key features: - Tracks page views (PV) and unique visitors (UV) per page - Provides a minimal JavaScript tracker snippet for embedding in websites - Supports both the hosted demo at webviso.yestool.org and self-hosted deployment via Wrangler CLI - Displays counts using simple HTML elements with IDs (default: `page_pv` and `page_uv`) Deployment requires Wrangler CLI, a Cloudflare account, and creation of a D1 database named `web_analytics`. After deployment, users add the provided script tag to their site and display results using pre-defined element IDs or custom ones via data attributes. The demo site is available at https://webviso.yestool.org/ and the source repository is yestool/analytics_with_cloudflare.