First-party visitor counter
First-party visitor counter
This Cloudflare Worker provides the public visit total shown on the homepage. It stores only one aggregate integer in D1 and does not store visitor IP addresses, user agents, or individual profiles.
Deployment requires:
- A D1 database with
schema.sqlapplied. - A Worker with the D1 binding named
DB. - The custom hostname
counter.hushiyu1995.com. - A Cloudflare Web Analytics site token added separately for private traffic trends; it is not required for the public count.
