chore: switch analytics from gtm to plausible#609
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request replaces Google Tag Manager with a new analytics script in the VitePress configuration. Feedback was provided to ensure the data-domain attribute uses the actual site domain rather than a placeholder to guarantee correct event attribution.
| gtag('config', 'G-63L7VEB1RB');` | ||
| { | ||
| defer: "", | ||
| "data-domain": "pa-9z3f-p-ATqjtilwc0InyS", |
There was a problem hiding this comment.
The data-domain attribute for Plausible Analytics typically requires the actual domain name of the site (e.g., usage.jdx.dev) to correctly attribute events in the dashboard. The value pa-9z3f-p-ATqjtilwc0InyS appears to be a placeholder or an incorrect identifier. Unless your custom proxy specifically maps this ID to the domain, you should use the site's domain name here.
"data-domain": "usage.jdx.dev",
Greptile SummaryThis PR replaces Google Tag Manager with Plausible Analytics on the docs site, loading the tracking script through a Cloudflare worker proxy at Confidence Score: 5/5Safe to merge — single-file docs config change with no impact on library functionality. No P0 or P1 issues found. The change correctly swaps two GTM script tags for one deferred Plausible script; all attributes (defer, data-domain, data-api, src) look well-formed and intentional. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Browser
participant shrill.en.dev (CF Worker)
participant Plausible Analytics
Browser->>shrill.en.dev (CF Worker): GET /shrill/script.js
shrill.en.dev (CF Worker)-->>Browser: Plausible tracking script
Browser->>shrill.en.dev (CF Worker): POST /f5f1/event (pageview)
shrill.en.dev (CF Worker)->>Plausible Analytics: Forward event for usage.jdx.dev
Plausible Analytics-->>shrill.en.dev (CF Worker): 202 Accepted
shrill.en.dev (CF Worker)-->>Browser: 202 Accepted
Reviews (2): Last reviewed commit: "fix: use site domain for plausible data-..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #609 +/- ##
=======================================
Coverage 79.03% 79.03%
=======================================
Files 48 48
Lines 7235 7235
Branches 7235 7235
=======================================
Hits 5718 5718
Misses 1140 1140
Partials 377 377 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
### 🚀 Features - **(complete)** auto-completion for usage shebang scripts by [@jdx](https://github.com/jdx) in [#620](#620) ### 🐛 Bug Fixes - **(docs)** stack banner and pin close button on mobile by [@jdx](https://github.com/jdx) in [#603](#603) ### 📚 Documentation - **(site)** show release version and github stars by [@jdx](https://github.com/jdx) in [#604](#604) - add cross-site announcement banner by [@jdx](https://github.com/jdx) in [#600](#600) - fix banner dark-mode contrast by [@jdx](https://github.com/jdx) in [#601](#601) - respect banner expires field by [@jdx](https://github.com/jdx) in [#602](#602) - prefix star count with ★ glyph and populate it on deploy by [@jdx](https://github.com/jdx) in [#606](#606) - integrate Commander.js, oclif and yargs by [@gaojunran](https://github.com/gaojunran) in [#616](#616) - integrate Typer and Click by [@gaojunran](https://github.com/gaojunran) in [#619](#619) ### 🔍 Other Changes - **(docs)** remove shrill.en.dev analytics script by [@jdx](https://github.com/jdx) in [#614](#614) - **(release)** append en.dev sponsor blurb to release notes by [@jdx](https://github.com/jdx) in [#598](#598) - switch analytics from gtm to plausible by [@jdx](https://github.com/jdx) in [#609](#609) - pin taiki-e/install-action to commit SHA by [@jdx](https://github.com/jdx) in [#610](#610) - rename CLAUDE.md to AGENTS.md and symlink by [@jdx](https://github.com/jdx) in [#618](#618) ### 📦️ Dependency Updates - bump communique to 1.1.2 by [@jdx](https://github.com/jdx) in [#605](#605) - lock file maintenance by [@renovate[bot]](https://github.com/renovate[bot]) in [#607](#607) - update autofix-ci/action action to v1.3.4 by [@renovate[bot]](https://github.com/renovate[bot]) in [#611](#611) - update apple-actions/import-codesign-certs action to v7 by [@renovate[bot]](https://github.com/renovate[bot]) in [#612](#612) - update taiki-e/install-action digest to fc9eae0 by [@renovate[bot]](https://github.com/renovate[bot]) in [#613](#613) --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Summary
🤖 Generated with Claude Code
Note
Low Risk
Low risk: only updates a client-side analytics script in VitePress
headmetadata with no impact on core app logic or data handling beyond pageview tracking.Overview
Switches the docs site analytics integration in
docs/.vitepress/config.mtsby removing the inline Google Tag Manager/gtagsetup and loading a deferred Plausible-style script instead.The new script is configured via
data-domainand a customdata-apiendpoint pointing at theshrill.en.devproxy.Reviewed by Cursor Bugbot for commit 83af975. Bugbot is set up for automated code reviews on this repo. Configure here.