feat(docs): add PostHog web analytics#208
Merged
rhuanbarreto merged 5 commits intomainfrom Apr 14, 2026
Merged
Conversation
commitizen/cz-cli is flagged as abandoned by Renovate. Replace it with czg — a lightweight, zero-dependency conventional-commits CLI that reads commitlint config natively. - Remove commitizen, @commitlint/cz-commitlint, inquirer - Add czg 1.12.0 - Update commit script from "cz" to "czg" - Delete .czrc (czg reads .commitlintrc.json directly)
Initialize PostHog via the posthog-js SDK inside the existing HeadSEO.astro override, alongside the current Cloudflare beacon. Traffic is routed through the managed reverse proxy at n.archgate.dev, with ui_host pointing back to eu.posthog.com so dashboard deep-links resolve correctly. Only identified users get profiles (person_profiles: identified_only) and the 2026-01-30 defaults are used for up-to-date capture behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deploying archgate-cli with
|
| Latest commit: |
9132718
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0c5f65dc.archgate-cli.pages.dev |
| Branch Preview URL: | https://feat-posthog-docs-analytics.archgate-cli.pages.dev |
Oxlint 1.59 now scans .astro files when they contain a typeless
<script> block, and then treats the whole file as JavaScript — which
fails on the JSX-like template expressions in HeadSEO.astro (e.g.
{breadcrumbLd && (...)}).
Move the bundled PostHog <script> into its own Analytics.astro
component (pure <script>, no template logic) and render it from
HeadSEO.astro. Behaviour is unchanged — same SDK, same proxy, same
bundled asset in the final build.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
posthog-jsSDK insidedocs/src/components/HeadSEO.astro, alongside the existing Cloudflare beacon.https://n.archgate.dev, withui_hostset tohttps://eu.posthog.comso PostHog dashboard deep-links resolve correctly.person_profiles: "identified_only"and the2026-01-30defaults.Test plan
bun run buildsucceeds indocs/and the generated HTML references the bundled HeadSEO script, which contains the PostHog init call.cli.archgate.dev: confirmposthogis defined on the page, events reach the EU PostHog project, andn.archgate.devshows the expected proxy traffic.🤖 Generated with Claude Code