Skip to content

dcartertwo/chickadee

 
 

Repository files navigation

🐦 Chickadee Analytics

Simple, privacy-focused web analytics you can self-host on Cloudflare.

Deploy to Cloudflare

Monorepo:

  • ./packages/app - the service: events endpoint, client script, and dashboard
  • ./packages/web - the landing page: https://www.chickadee.me

Deploy your Own

  1. Make sure you have installed the Cloudflare Wrangler CLI and authenticated with your Cloudflare account by calling wrangler login.
  2. Clone the repo: git clone https://github.com/abegehr/chickadee and cd chickadee.
  3. Run pnpm i to install the dependencies.
  4. Create a new KV namespace on Cloudflare for chickadee: pnpm app wrangler kv namespace create chickadee and update the id in ./packages/app/wrangler.toml.
  5. Run pnpm app run deploy to deploy the service to Cloudflare.
  6. Make note of your worker URL: https://<your-worker-name>.workers.dev.
  7. Set all secrets listed in the Secrets section on you worker: pnpm app wrangler secret put ….
  8. Open your worker URL in your browser and login with username admin and password BASIC_PASSWORD configured in step 6.

Development

Secrets

Copy ./packages/app/.dev.vars.example to ./packages/app/.dev.vars and set the following secrets:

Inspired by

Daily Unique Visitor Count

To count daily unique visitors without cookies, we use a fingerprint hash that rotates daily:

hash(daily_salt + sid + ip + userAgent + acceptLanguage)

Props to Plausible.io for the concept: https://plausible.io/data-policy#how-we-count-unique-users-without-cookies.

TODOs

  • landing page
  • events endpoint
  • script for client-side page views
  • count daily unique visitors
  • dashboard with graphs
  • demo dashboard
  • cli for easy deployment
  • live-mode
  • page with grid of all sites
  • add loadTime metric to dashboard
  • add screen size to dashboard?
  • filter dashboard by dimensions
  • add retention to dashboard (based on user id)

About

Simple, privacy-focused web analytics you can self-host on Cloudflare.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.8%
  • JavaScript 1.5%
  • CSS 0.7%