Skip to content

Release: codebar analytics tracker - #131

Merged
StanBarrows merged 1 commit into
productionfrom
main
Oct 25, 2026
Merged

StanBarrows merged 1 commit into
productionfrom
main

Conversation

@StanBarrows

Copy link
Copy Markdown
Contributor

Summary

  • Embeds the codebar analytics tracker (https://analytics.codebar.ch/js/script.js) in production, next to Fathom.
  • Controlled by CODEBAR_ANALYTICS_URL (config default.services.codebar_analytics.url); no tag when it is empty or outside production.
  • CSP: analytics.codebar.ch in script-src and connect-src (events go to /api/event via sendBeacon).
  • Fathom stays until the switch.

Deploy notes

  • CODEBAR_ANALYTICS_URL=https://analytics.codebar.ch must be set on the Cloud production environment (takes effect with this deploy).
  • The site needs a project with its domain patterns in analytics.codebar.ch, otherwise events are ignored (204).

Test plan

  • New tests: partial renders in production with a URL, not outside production, not without URL; CSP allows the host
  • CI (Pest, coverage, Larastan, browser)

🤖 Generated with Claude Code

Loads https://analytics.codebar.ch/js/script.js in production when
CODEBAR_ANALYTICS_URL is set (config default.services.codebar_analytics),
and allows analytics.codebar.ch in script-src and connect-src (the tracker
sends events with sendBeacon to /api/event). Fathom stays in place so both
can run side by side until the switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@StanBarrows
StanBarrows merged commit c4328ff into production Oct 25, 2026
7 checks passed
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.

1 participant