feat(docs-site): add PostHog analytics to the documentation site
Merged
ST
4d ago+7+7+0123456789-0-0-0123456789
Summary
- The documentation site (
docs-site/, which Mintlify builds and serves at docs.quivr.thevibecompany.co) now sends analytics to the PostHog project "Quivr Docs" (US cloud). - It uses Mintlify's built-in PostHog integration: an
integrations.posthogblock indocs-site/docs.jsonwith the public project key andapiHost: https://us.i.posthog.com. The repo has no JavaScript build for the docs, so there is noposthog-jsdependency. Mintlify loads PostHog, captures pageviews and keeps PostHog's autocapture defaults. sessionRecordingis set tofalse. Mintlify turns recordings on by default, this change only asks for pageviews and autocapture, and the API playground is where readers type bearer tokens. Set it totrueto turn recordings on; PostHog also needs the docs domain in its authorized URLs for that.- No changes to the Go engine or to any other frontend.
Configuration
- Environment variables: none. Mintlify reads
docs.jsonas static configuration and has no environment-variable substitution for integrations. The key is committed indocs.json; it is the publicphc_project key, which Mintlify documents as safe to commit. No other secret is added. - Reverse proxy: not set up. When
apiHostis unset, Mintlify uses its own proxy (https://ph.mintlify.com); this PR pointsapiHoststraight athttps://us.i.posthog.cominstead. - Accounts: the documentation site has no user accounts, so there is no
identify,resetorsigned_upevent. - Local preview: Mintlify has no switch to turn the integration off in
mint dev. In a scripted headless Chrome session onmake docs-preview, the page loaded PostHog'sconfig.jsand called/flags/on us.i.posthog.com. It sent no event requests, including after a client-side navigation. That is one local observation, not a documented guarantee.
How to test
- After merge and the Mintlify deploy, open https://docs.quivr.thevibecompany.co and click a few pages in the sidebar.
- In PostHog, project "Quivr Docs" ā Activity / Live events: expect
$pageviewevents for the first load and for each sidebar navigation.
Verification
-
make docs-site-check(Mintlifyvalidate+broken-links --check-anchors, pinned mint@4.2.952) passes.mint validatechecks theintegrations.posthogschema: a non-booleansessionRecordingmakes it fail. -
make docspasses -
make denylistpasses; both commit messages passscripts/denylist.py --stdin - Production pageview capture, including client-side route changes, is not verified: it depends on Mintlify's hosted build and can only be checked after deploy (see How to test).
Review gate
review-code-devv2 (OCR v1.12.1), 1/1 files reviewed. One low finding (session recording on by default) was fixed in this PR. The re-review is clean.
Notes
docs-site/docs.jsonis hand-written site settings, not a living page declared indocs/inventory.toml, so no documentation page changes.- There is no Linear ticket for this change. It was requested and approved directly.
š¤ Generated with Claude Code
Summary by cubic
Adds PostHog analytics to the documentation site so pageviews and autocapture events land in the new "Quivr Docs" PostHog project (US cloud).
Uses Mintlify's built-in PostHog integration configured in docs-site/docs.json, with no new dependencies, environment variables, or engine changes. Session recording is explicitly disabled because Mintlify turns it on by default and the API playground accepts bearer tokens. No changes to the Go engine or any other frontend.