-
Notifications
You must be signed in to change notification settings - Fork 428
[Docs] posthog Integration #761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added PostHog analytics integration to the docs site with several implementation concerns that need addressing.
- Hardcoded PostHog key in
docs/src/components/posthog-provider.tsx
should be moved to environment variables for security and flexibility - Missing critical security configurations for input masking that exist in main app, potentially exposing sensitive data
- Weak validation check for PostHog key (length > 5) in provider component needs stronger validation
- Development artifacts (console.log statements) left in production code
- Consider using
Map
instead of plain objects in pageview tracking to prevent potential prototype pollution vulnerabilities
5 files reviewed, 3 comments
Edit PR Review Bot Settings | Greptile
😱 Found 1 issue. Time to roll up your sleeves! 😱 🗒️ View all ignored comments in this repo
Need help? Join our Discord for support! |
Important
Integrates PostHog for page view tracking in the documentation site with necessary rewrites and components.
layout.tsx
usingPostHogPageView
andCSPostHogProvider
.posthog-js
topackage.json
dependencies.next.config.mjs
to prevent ad blockers from blocking PostHog requests.PostHogPageView
inpageview.tsx
andpageview-dynamic.tsx
to capture page views.CSPostHogProvider
inposthog-provider.tsx
to initialize PostHog with specific settings.This description was created by
for 5551f4f. You can customize this summary. It will automatically update as commits are pushed.