The wizard has completed a deep integration of PostHog into your RealtyLens Next.js project. The integration includes:
- Client-side initialization via
instrumentation-client.tsusing the Next.js 15.3+ pattern - Server-side tracking capability via
lib/posthog-server.tsfor backend events - Reverse proxy configuration in
next.config.tsto route analytics through your domain (/ingest/*) - User identification on sign-up, sign-in, and invitation acceptance
- Session reset on sign-out to properly handle multi-user devices
- Error tracking enabled via
capture_exceptions: true - Environment variables configured in
.envfor PostHog API key and host
| Event Name | Description | File Path |
|---|---|---|
user_signed_up |
User successfully created a new account | app/(auth)/sign-up/page.tsx |
user_signed_in |
User successfully signed into their account | app/(auth)/sign-in/page.tsx |
user_signed_out |
User signed out of their account | components/dashboard/sign-out-button.tsx |
onboarding_completed |
User completed their profile setup during onboarding | components/onboarding/onboarding-form.tsx |
project_created |
User created a new photo enhancement project | components/projects/new-project-dialog.tsx |
images_added_to_project |
User added additional images to an existing project | components/dashboard/add-images-dialog.tsx |
image_edited |
User used the mask editor to remove or add objects in an image | components/dashboard/image-mask-editor.tsx |
video_images_selected |
User selected images for video creation | components/video/video-creation/steps/select-images-step.tsx |
team_member_invited |
User created an invitation link for a team member | components/settings/invite-member-dialog.tsx |
invitation_accepted |
User accepted a workspace invitation and joined the team | app/invite/[token]/invite-accept-form.tsx |
contact_form_submitted |
User submitted the contact form | components/landing/contact-page.tsx |
pricing_cta_clicked |
User clicked Get Started button on pricing page | components/landing/pricing-page.tsx |
instrumentation-client.ts- PostHog client-side initializationlib/posthog-server.ts- Server-side PostHog client.env- Environment variables for PostHog
next.config.ts- Added reverse proxy rewrites andskipTrailingSlashRedirectapp/(auth)/sign-up/page.tsx- Added user identification and sign-up eventapp/(auth)/sign-in/page.tsx- Added user identification and sign-in eventcomponents/dashboard/sign-out-button.tsx- Added sign-out event and session resetcomponents/onboarding/onboarding-form.tsx- Added onboarding completed eventcomponents/projects/new-project-dialog.tsx- Added project created eventcomponents/dashboard/add-images-dialog.tsx- Added images added eventcomponents/dashboard/image-mask-editor.tsx- Added image edited eventcomponents/video/video-creation/steps/select-images-step.tsx- Added video images selected eventcomponents/settings/invite-member-dialog.tsx- Added team member invited eventapp/invite/[token]/invite-accept-form.tsx- Added invitation accepted eventcomponents/landing/contact-page.tsx- Added contact form submitted eventcomponents/landing/pricing-page.tsx- Added pricing CTA clicked event
We've built some insights and a dashboard for you to keep an eye on user behavior, based on the events we just instrumented:
- Analytics basics - Core analytics dashboard with key metrics
- User Sign-ups Over Time - Track new user registrations
- Sign-up to Onboarding Funnel - Conversion from sign-up to onboarding completion
- Projects Created Over Time - Track project creation engagement
- Sign-up to First Project Funnel - Full conversion funnel from sign-up to first project
- Key User Actions - Overview of key business actions