[CI] (6fb03e7) nuxt/movies-nuxt-4#1478
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog into a Nuxt 4 movies application using the
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | Valid Nuxt config, correct module registration, proper imports |
| Preserves existing env vars & configs | Yes | Existing config preserved; PostHog additions are additive |
| No syntax or type errors | Yes | All Vue SFC syntax is valid; TypeScript types are correct |
| Correct imports/exports | Yes | usePostHog() from @posthog/nuxt, PostHog from posthog-node are correct |
| Minimal, focused changes | Yes | Changes are focused on PostHog integration |
| Pre-existing issues | None | No pre-existing issues found |
Issues
.env.examplenot updated: The new environment variablesNUXT_PUBLIC_POSTHOG_PROJECT_TOKENandNUXT_PUBLIC_POSTHOG_HOSTare required but not added to.env.example(which only containsBASE_URL). Developers cloning the project won't know which env vars to set. [MEDIUM]
Other completed criteria
- Build configuration is valid —
@posthog/nuxtandposthog-nodeadded to dependencies correctly - Code follows existing codebase patterns — uses Vue 3 composition API, Nuxt composables, consistent style
- All changes relate to PostHog integration
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | @posthog/nuxt@^1.7.30 and posthog-node@^5.34.1 in package.json |
| PostHog client initialized | Yes | @posthog/nuxt module in nuxt.config.ts with posthogConfig block; capture_exceptions: true enabled |
| capture() | Yes | 10+ meaningful capture calls across pages and components |
| identify() | No | posthog.identify(username.value) called after login, but NOT called on app load/page refresh for already-authenticated users. The auth-user cookie persists, so returning users will generate anonymous events. Should add identify in an app-level plugin or layout that checks for the existing auth cookie. |
| Error tracking | Yes | capture_exceptions: true in client config, enableExceptionAutocapture: true in server config, manual captureException(e) in login catch block |
| Reverse proxy | No | No reverse proxy configured. Client-side PostHog traffic goes directly to us.i.posthog.com, which ad blockers can intercept. Nuxt's routeRules or a server middleware could proxy /ingest/* to PostHog. |
Issues
- No identify on page refresh: When a user returns to the app with an existing
auth-usercookie,posthog.identify()is never called. All events will be anonymous until the user logs in again. Add a Nuxt plugin or layout-level check: ifuseAuth().useris set, callposthog.identify(user). [CRITICAL] - No reverse proxy: PostHog client traffic is sent directly to
us.i.posthog.com. Configure NuxtrouteRulesor a Nitro server route to proxy/ingest/*requests to PostHog to avoid ad blocker interference. [MEDIUM]
Other completed criteria
- API key loaded from environment variable
NUXT_PUBLIC_POSTHOG_PROJECT_TOKEN - Host correctly configured via
NUXT_PUBLIC_POSTHOG_HOSTwith fallback tohttps://us.i.posthog.com posthog.reset()called on logout in NavBar- Server-side PostHog client properly initialized as singleton with correct host
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
pages/login.vue |
user_logged_in, identify, captureException |
Captures successful login, identifies user, and tracks login errors |
components/NavBar.vue |
user_logged_out, reset() |
Captures logout and resets PostHog identity |
server/api/auth/login.post.ts |
server_login |
Server-side login event with session/distinct ID correlation |
pages/[type]/[id].vue |
media_viewed |
Media detail page view with type, id, and title |
pages/search.vue |
search_performed |
Search execution with query string |
components/video/Card.vue |
video_played |
Video play with name, type, and key |
components/media/Card.vue |
media_card_clicked |
Media card click with type, id, and title |
pages/genre/[no]/movie.vue |
genre_browsed |
Genre page view for movies |
pages/genre/[no]/tv.vue |
genre_browsed |
Genre page view for TV |
pages/person/[id].vue |
person_viewed |
Person detail page view |
components/LanguageSwitcher.vue |
language_changed |
Language switch with old and new locale |
Issues
- PII in
server_loginevent: Theserver_loginevent includesusername: sanitizedUsernameas an event property. Usernames are PII and should be set via person properties (``) instead of event properties. [MEDIUM]
Other completed criteria
- Events represent real user actions (login, logout, browse, search, play, view)
- Events enable product insights — clear funnel from
media_card_clicked→media_viewed→video_played - Events include relevant contextual properties (media_type, media_id, genre_name, etc.)
- Event names are descriptive and use consistent snake_case convention
Reviewed by wizard workbench PR evaluator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated wizard CI run
Source: scheduled
Trigger ID:
6fb03e7App:
nuxt/movies-nuxt-4App directory:
apps/nuxt/movies-nuxt-4Workbench branch:
wizard-ci-6fb03e7-nuxt-movies-nuxt-4Wizard branch:
mainContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-05-13T17:33:31.260Z
Duration: 388.7s