The wizard has completed a deep integration of PostHog analytics into notJust.dev. Here's a summary of every change made:
instrumentation-client.ts(new file, project root): Initializesposthog-jsfor the entire Next.js app using the recommendedinstrumentation-clientpattern (Next.js 15.3+). Includes error tracking (capture_exceptions: true) and a reverse proxy API host (/ingest).next.config.mjs: Added three PostHog reverse proxy rewrites (/ingest/static/*,/ingest/array/*,/ingest/*) andskipTrailingSlashRedirect: trueso PostHog events are routed through your own domain, improving reliability and reducing ad-blocker interference..env.local: AddedNEXT_PUBLIC_POSTHOG_KEYandNEXT_PUBLIC_POSTHOG_HOSTenvironment variables (values never hardcoded in source).src/app/(landings)/newsletter/form.tsx: Tracksnewsletter_subscription_started(on form submit) andnewsletter_subscribed(when server action returns success).src/app/(main)/links/page.tsx: Trackslinks_page_link_clicked(withlink_textandhrefproperties) andnewsletter_modal_openedwhen the newsletter modal is opened from the links page.src/app/(tools)/app-revenue-calculator/calcualtor.tsx: Trackscalculator_category_changedandcalculator_downloads_changedas users interact with the revenue calculator.src/components/PostLinks/PostLinks.tsx: Added'use client'directive and trackspost_github_link_clicked(withpost_slugandurl) when users click the source code link on a post.src/components/ProjectCard.tsx: Added'use client'directive and tracksproject_card_clicked(withproject_slug,project_title, andurl) when users click a project card.
| Event | Description | File |
|---|---|---|
newsletter_subscription_started |
User submitted the newsletter signup form | src/app/(landings)/newsletter/form.tsx |
newsletter_subscribed |
Server confirmed newsletter subscription success | src/app/(landings)/newsletter/form.tsx |
newsletter_modal_opened |
User opened newsletter modal from links page | src/app/(main)/links/page.tsx |
links_page_link_clicked |
User clicked a link on the linktree-style links page | src/app/(main)/links/page.tsx |
calculator_category_changed |
User selected an app category in the revenue calculator | src/app/(tools)/app-revenue-calculator/calcualtor.tsx |
calculator_downloads_changed |
User changed downloads count in the revenue calculator | src/app/(tools)/app-revenue-calculator/calcualtor.tsx |
post_github_link_clicked |
User clicked the GitHub source code link on a post | src/components/PostLinks/PostLinks.tsx |
post_youtube_link_clicked |
User clicked the YouTube video link on a post | src/components/PostLinks/PostLinks.tsx |
project_card_clicked |
User clicked a project card to view project | src/components/ProjectCard.tsx |
We've built some insights and a dashboard for you to keep an eye on user behavior, based on the events we just instrumented:
- Dashboard — Analytics basics: https://us.posthog.com/project/395704/dashboard/1506275
- Newsletter Subscription Funnel (started → confirmed): https://us.posthog.com/project/395704/insights/jl9q3bAu
- Newsletter Subscriptions Over Time (daily trend): https://us.posthog.com/project/395704/insights/PcLfYVOn
- Revenue Calculator Engagement: https://us.posthog.com/project/395704/insights/UiTlV9Bh
- Links Page — Top Clicked Links: https://us.posthog.com/project/395704/insights/Itpkf7SM
- Post External Link Clicks (GitHub + YouTube, weekly): https://us.posthog.com/project/395704/insights/ttD6RhSp
We've left an agent skill folder in your project. You can use this context for further agent development when using Claude Code. This will help ensure the model provides the most up-to-date approaches for integrating PostHog.