docs(site): add self-hosted page tracker via Cloudflare Worker, drop GoatCounter#9430
docs(site): add self-hosted page tracker via Cloudflare Worker, drop GoatCounter#9430
Conversation
Replace Google Tag Manager and GoatCounter with a self-hosted Plausible proxy at shrill-1.en.dev. The proxy follows Plausible's recommended Cloudflare Worker pattern (separate paths for the script and event endpoint to evade ad-blocker heuristics). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Greptile SummaryThis PR replaces the GoatCounter analytics script with a Plausible script routed through a Cloudflare Worker proxy. Beyond the proxy hostname discrepancy flagged below, previously raised reviews noted that the GTM scripts are still present and Confidence Score: 3/5Multiple unresolved analytics configuration issues mean this PR will likely not record pageviews correctly after merge. Three P1-level issues exist: GTM not removed (contradicts stated intent), wrong data-domain (mise.en.dev vs mise.jdx.dev), and proxy hostname mismatch (shrill.en.dev vs shrill-1.en.dev in description). Any one of these would silently break pageview tracking. docs/.vitepress/config.ts — verify the correct Cloudflare Worker hostname, set data-domain to the registered Plausible site domain, and remove the GTM blocks if they are no longer needed. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant CloudflareWorker as Cloudflare Worker (shrill.en.dev)
participant Plausible as Plausible Server
Browser->>CloudflareWorker: GET /shrill/script.js
CloudflareWorker-->>Browser: Plausible tracking script
Browser->>CloudflareWorker: POST /f5f1/event (pageview)
CloudflareWorker->>Plausible: Forward event for mise.en.dev
Plausible-->>CloudflareWorker: 202 Accepted
CloudflareWorker-->>Browser: 202 Accepted
Reviews (4): Last reviewed commit: "docs(site): use shrill.en.dev as proxy h..." | Re-trigger Greptile |
There was a problem hiding this comment.
Code Review
This pull request replaces Google Analytics and GoatCounter with a Plausible analytics implementation proxied through a Cloudflare Worker. The review feedback highlights that the script tag is missing the necessary 'data-domain' and 'data-api' attributes required for Plausible to correctly identify the site and route events. Additionally, it is recommended to simplify the manual initialization script to the standard Plausible helper to ensure compatibility and automatic tracking.
| { | ||
| async: "", | ||
| src: "https://www.googletagmanager.com/gtag/js?id=G-B69G389C8T", | ||
| src: "https://shrill-1.en.dev/shrill/script.js", |
There was a problem hiding this comment.
The Plausible script requires a data-domain attribute to identify the site in your dashboard. Additionally, since you are using a custom path for the event endpoint (/f5f1/event), you should specify the data-api attribute on the script tag. This is the standard way to configure Plausible with a proxy and ensures that the script correctly routes events through your Cloudflare Worker.
"data-domain": "mise.jdx.dev",
"data-api": "https://shrill-1.en.dev/f5f1/event",
src: "https://shrill-1.en.dev/shrill/script.js",| `window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}}; | ||
| plausible.init({ | ||
| endpoint: "https://shrill-1.en.dev/f5f1/event" | ||
| })`, |
There was a problem hiding this comment.
This manual initialization script is non-standard for the official Plausible script and is missing the required domain property. If the script tag above is correctly configured with data-domain and data-api, the official script will automatically handle pageview tracking. You can simplify this block to the standard Plausible helper, which allows you to trigger manual events later if needed.
`window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }`Configures the script via data-domain and data-api attributes (per the proxy guide) so pageview tracking works automatically. Drops the inline init block, removing the only spot where the well-known global name appeared in served HTML. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Keep GTM alongside the new tracker; only GoatCounter is removed. Use mise.en.dev as the configured site domain. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
| "data-api": "https://shrill.en.dev/f5f1/event", | ||
| src: "https://shrill.en.dev/shrill/script.js", | ||
| }, |
There was a problem hiding this comment.
Proxy hostname mismatch vs PR description
The PR description says the Cloudflare Worker is reachable at shrill-1.en.dev, but the actual script src and data-api both point to shrill.en.dev (no -1). If the worker is only deployed at shrill-1.en.dev, the script will 404 and no pageviews will be recorded.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bf02c04. Configure here.
| rel: "stylesheet", | ||
| }, | ||
| ], | ||
| // Analytics |
There was a problem hiding this comment.
GTM scripts not removed despite stated intent
High Severity
The PR intended to replace Google Tag Manager (GTM) and GoatCounter with Plausible. While GoatCounter was removed, the GTM scripts (loader and inline gtag() initialization) remain in the head array. This results in dual analytics tracking, with both GTM and Plausible firing.
Reviewed by Cursor Bugbot for commit bf02c04. Configure here.
| defer: "", | ||
| "data-domain": "mise.en.dev", | ||
| "data-api": "https://shrill.en.dev/f5f1/event", | ||
| src: "https://shrill.en.dev/shrill/script.js", |
There was a problem hiding this comment.
Proxy domain mismatch between code and PR description
High Severity
It looks like the analytics script's src and data-api attributes reference shrill.en.dev, but the PR description indicates the Cloudflare Worker proxy is deployed at shrill-1.en.dev. This mismatch means the analytics script won't load and events won't be recorded, leading to silently broken analytics.
Reviewed by Cursor Bugbot for commit bf02c04. Configure here.
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.24 x -- echo |
24.4 ± 0.8 | 23.4 | 31.5 | 1.00 ± 0.04 |
mise x -- echo |
24.4 ± 0.3 | 23.6 | 26.1 | 1.00 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.24 env |
23.2 ± 0.5 | 22.5 | 27.7 | 1.00 |
mise env |
23.9 ± 0.8 | 23.2 | 35.0 | 1.03 ± 0.04 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.24 hook-env |
24.2 ± 0.6 | 23.4 | 29.4 | 1.00 |
mise hook-env |
25.0 ± 0.7 | 23.9 | 33.8 | 1.03 ± 0.04 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.4.24 ls |
24.9 ± 0.6 | 23.8 | 26.7 | 1.00 |
mise ls |
25.6 ± 1.0 | 24.6 | 36.2 | 1.03 ± 0.05 |
xtasks/test/perf
| Command | mise-2026.4.24 | mise | Variance |
|---|---|---|---|
| install (cached) | 159ms | 166ms | -4% |
| ls (cached) | 81ms | 84ms | -3% |
| bin-paths (cached) | 83ms | 85ms | -2% |
| task-ls (cached) | 788ms | 796ms | -1% |
### 🚀 Features - **(task)** add --name-only flag to mise tasks ls by @jdx in [#9435](#9435) ### 🐛 Bug Fixes - **(Dockerfile)** install copr-cli via dnf for better dependency management by @bestagi in [#9421](#9421) - **(aqua)** drop empty-releases fallback to tags by @jdx in [#9443](#9443) - **(docs)** fix theme flicker on docs by @vhespanha in [#9427](#9427) - **(lockfile)** update global lockfile on upgrade by @jdx in [#9442](#9442) - **(ls-remote)** omit rolling/prerelease from JSON when false by @jdx in [#9439](#9439) - **(task)** support usage refs in dependency template tags by @jdx in [#9424](#9424) - **(task)** populate usage.cmd for subcommand-only tasks; share make_usage_ctx by @jdx in [#9431](#9431) - **(task)** resolve sandbox allow_read/allow_write against task dir by @jdx in [#9428](#9428) ### 📚 Documentation - **(site)** add self-hosted page tracker via Cloudflare Worker, drop GoatCounter by @jdx in [#9430](#9430) ### New Contributors - @vhespanha made their first contribution in [#9427](#9427) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>


Summary
shrill.en.dev. Following the upstream proxy guide, the Worker exposes the script at/shrill/script.jsand the event endpoint at/f5f1/eventso neither path matches well-known content-blocker heuristics.data-domain="mise.en.dev"anddata-api="https://shrill.en.dev/f5f1/event"on the script tag — pageview tracking is automatic, so no inline init block is needed.Test plan
https://shrill.en.dev/shrill/script.jsloads (200) andhttps://shrill.en.dev/f5f1/eventrecords the pageview (POST 202).gtag/js?id=G-B69G389C8T) still loads.🤖 Generated with Claude Code