Skip to content

Plausible on www.letsauth.eu via the personal script; bundles under /assets/, www as canonical host - #74

Merged
jbspeakr merged 2 commits into
mainfrom
claude/project-thread-zgci8j
Oct 23, 2026
Merged

jbspeakr merged 2 commits into
mainfrom
claude/project-thread-zgci8j

Conversation

@jbspeakr

@jbspeakr jbspeakr commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Jan · project thread

What this changes

Why nothing arrived since #49: the site is served on www.letsauth.eu, but the tracking module only reported when the hostname equalled Astro.site (letsauth.eu). It returned early on every real visit, so no /r/e.json request was ever sent. Both hosts count now.

Same setup as rucksackrebellen.de

  • Pages load the personal Plausible script (pa-dijXYLvcgUmFUPtPr7i0G.js) from /r/s.js; a new managed edge rule [repo] Plausible script forwards it to plausible.io (cached 1 h). Events still go to /r/e.json via the existing rule.
  • Outbound links and file downloads now come from Plausible's script and follow the site settings; the init adds json to the download extensions so the exports count. Our own click handling is gone.
  • Pageviews stay with our code (autoCapturePageviews: false): a page prerendered by speculation rules counts only once shown; bfcache restores and the explorer's in-place toggles count again; 404s send a 404 event.

Neutral paths: bundles are named after their modules (/_astro/analytics.*.js before), and blocklists match "analytics" in a path. The module and component are now src/lib/reach.ts and Reach.astro, and bundles live under /assets/ (build.assets) instead of /_astro/.

www as canonical host: site is https://www.letsauth.eu, so canonical links, sitemap and Open Graph URLs use www; so do the JSON exports' source, robots.txt, security.txt and the link checker. The scanner's User-Agent keeps the apex URL.

The edge-rule sync on the next deploy creates the script rule; no settings change needed. Old /_astro/ files stay in storage (the deploy never deletes), which is harmless.

Code checklist

  • pnpm check passes.
  • Pages still read fully without JavaScript; the island stays within the JS budget.
  • Both themes checked; screenshots updated only for intended changes. (No visual change.)

🤖 Generated with Claude Code

https://claude.ai/code/session_018sUALNpiVEQ4wUVUpDDY96

…through the proxy

No pageview has arrived since the proxy went live: the site is served on
www.letsauth.eu, and the script only reported when the hostname was exactly
letsauth.eu (Astro's site), so it never sent anything. Both hosts count now.

Pages load the site's personal Plausible script from /r/s.js, forwarded by a
new managed edge rule, as on rucksackrebellen.de. Outbound links and file
downloads come from the script and follow the Plausible site settings; the
init adds json to the download extensions. Pageviews stay with our code
(autoCapturePageviews: false), so a prerendered page still counts only once
shown. The module and component take neutral names (reach), because bundles
are named after them and blocklists match "analytics" in a path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018sUALNpiVEQ4wUVUpDDY96
@jbspeakr jbspeakr self-assigned this Oct 23, 2026
Bundled scripts, styles and fonts move from Astro's default /_astro/ to
/assets/. www.letsauth.eu is the site's main address, so Astro's site (canonical
links, sitemap, Open Graph), the JSON exports' source links, robots.txt,
security.txt and the link checker use it. The scanner's User-Agent keeps the
apex URL, which still answers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018sUALNpiVEQ4wUVUpDDY96
@jbspeakr jbspeakr changed the title Plausible: count visits on www.letsauth.eu, load the personal script through the proxy Plausible on www.letsauth.eu via the personal script; bundles under /assets/, www as canonical host Oct 23, 2026
@jbspeakr
jbspeakr merged commit 562379c into main Oct 23, 2026
1 check failed
@jbspeakr
jbspeakr deleted the claude/project-thread-zgci8j branch October 23, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants