Skip to content

docs: add PostHog analytics + fix navbar primary href#54

Merged
soleil-colza merged 1 commit intomainfrom
eng-534
Apr 29, 2026
Merged

docs: add PostHog analytics + fix navbar primary href#54
soleil-colza merged 1 commit intomainfrom
eng-534

Conversation

@soleil-colza
Copy link
Copy Markdown
Contributor

Summary

  • Add PostHog integration to docs/docs.json so docs page views land in the same PostHog project as arkor.ai and Studio. One event stream across all surfaces; filter by \$current_url if separation is needed
  • sessionRecording: false. The visitor click/scroll capture is overkill for public docs, and keeps storage / privacy surface area down
  • Restore leading slash on navbar.primary.href (/quickstart). Mintlify's local validator rejects bare quickstart with "Must be a valid URL or relative path". Now that we publish at docs.arkor.ai (subdomain, not arkor.ai/docs subpath), an absolute path stays inside the docs site so the original form is fine

Test plan

  • pnpm --filter @arkor/docs exec mint validate passes locally
  • After merge, PostHog dashboard receives \$pageview events from docs.arkor.ai (or the Mintlify preview URL)

Routes docs page views to the existing arkor.ai / Studio PostHog
project so all surfaces share one event stream. Session recording
disabled: visitor click/scroll capture is overkill for public docs.

Also restore leading slash on navbar.primary.href: Mintlify's local
validator rejects bare "quickstart" with "Must be a valid URL or
relative path". With the new docs.arkor.ai subdomain, an absolute
path stays inside the docs site, so the original /quickstart is fine.
Copilot AI review requested due to automatic review settings April 29, 2026 07:59
@mintlify
Copy link
Copy Markdown

mintlify Bot commented Apr 29, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
arkor-92aeef0e 🟢 Ready View Preview Apr 29, 2026, 8:00 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR makes two targeted changes to docs/docs.json: it adds a PostHog analytics integration block (with session recording disabled) and restores the leading slash on navbar.primary.href so Mintlify's validator accepts it as a valid relative path. Both changes are correct and consistent with the described intent.

Confidence Score: 5/5

Safe to merge — changes are a config-only addition with no logic impact.

Both changes are correct: the PostHog phc_ key is a public client-side ingestion key by design (not a secret), session recording is explicitly disabled, and the /quickstart path fix aligns with Mintlify's validator requirements. No P0/P1 findings.

No files require special attention.

Important Files Changed

Filename Overview
docs/docs.json Adds PostHog analytics integration (client-side phc_ key, session recording disabled) and restores the leading slash on navbar.primary.href.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["docs.arkor.ai page load"] --> B["Mintlify runtime"]
    B --> C["PostHog JS snippet\n(phc_ project key)"]
    C --> D["PostHog Cloud\n$pageview event"]
    B --> E["navbar 'Get started' button\nhref: /quickstart"]
    E --> F["docs.arkor.ai/quickstart"]
Loading

Reviews (1): Last reviewed commit: "docs: add PostHog analytics integration" | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Mintlify docs configuration to align navigation validation requirements and to send docs pageview analytics into the existing PostHog project used by other Arkor surfaces.

Changes:

  • Fix navbar.primary.href to use an absolute path (/quickstart) to satisfy Mintlify validation.
  • Add a Mintlify integrations.posthog configuration with sessionRecording: false.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/docs.json
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@soleil-colza soleil-colza merged commit 3ecf861 into main Apr 29, 2026
19 checks passed
@soleil-colza soleil-colza deleted the eng-534 branch April 29, 2026 08:09
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.

3 participants