dozo
Menu
← Dozokit Analytics

Set up Dozokit Analytics in five minutes

You need a free Cloudflare account and a GitHub or GitLab account. Nothing to install on your computer.

Deploy to Cloudflare

The steps

  1. Click Deploy to Cloudflare above and sign in to Cloudflare.
  2. Connect GitHub when Cloudflare asks. It copies the Dozokit Analytics code into your account, and that copy is what it runs.
  3. Keep the names it suggests (dozokit-analytics) unless you already use them, and type a password of at least 12 characters. It’s the one you’ll sign in to your dashboard with.
  4. Click Create and deploy, then wait a minute or two while Cloudflare sets up the Worker and its database.
  5. Open the address Cloudflare shows when it’s done, something like dozokit-analytics.your-name.workers.dev, and sign in with your password.
  6. In Settings, add your website by typing its domain, then copy the one-line tag it gives you.
  7. Paste the tag inside the <head> of every page of your site (most site builders have a “custom code” or “head” setting), publish, and open your site once. Settings shows when the first visit arrives.

Later, if you need it

Use your own address, like stats.example.com

In Cloudflare, open the Worker, then Settings → Domains & Routes → Add → Custom domain. Then use that address in the tag instead of workers.dev. The domain has to be on Cloudflare.

Change the password

In Cloudflare, open the Worker, then Settings → Variables and Secrets, and edit PASSWORD.

Get updates

Your copy doesn’t follow Dozokit Analytics by itself, and a plain git pull won’t work because your copy has its own history. In a clone of your copy, run these three commands: they take the latest files but keep your own wrangler.jsonc, which holds your database’s id. Cloudflare rebuilds and deploys on every push.

git fetch https://github.com/dozokit/analytics main
git checkout FETCH_HEAD -- . ':!wrangler.jsonc'
git commit -m "Update Dozokit Analytics" && git push
Leave your own visits out

Open your site once with ?dozokit_ignore=1 at the end of the address.

I’ll install it for you

Rather not touch Cloudflare? Email me and I’ll set it up in your Cloudflare account, for the price of a coffee.

contact@dozokit.com

Email me