[CI] (1776c51) nuxt/movies-nuxt-3-6#2726
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog into a Nuxt 3.0-3.6 movies app using the
Confidence score: 4/5 👍
File changes
App sanity check ✅
Issues
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-js ^1.399.2 and posthog-node ^5.40.0 added to package.json |
| PostHog client initialized | Yes | Initialized in plugins/posthog.client.ts using runtime config, with defaults, capture_pageview: 'history_change', and __add_tracing_headers |
| capture() | Yes | Multiple meaningful capture calls across components and pages |
| identify() | Yes | identify() called on login in useAuth, and on page load for returning users in the plugin's loaded callback; reset() called on logout |
| Error tracking | Yes | captureException in error.vue, login.vue, search.vue, and via vue:error hook in plugin; server-side captureException in login error path |
| Reverse proxy | No | No reverse proxy configured; __add_tracing_headers is set but no proxy rewrites are defined |
Issues
- No reverse proxy: Client-side PostHog requests go directly to
us.i.posthog.comwith no reverse proxy, making them susceptible to ad blockers. Configure Nuxt server middleware or a proxy rewrite to route through/ingestor similar. [MEDIUM] - Redundant PostHog Node client in login handler: The login endpoint creates two separate
PostHoginstances — one for the success path and one for the error path. A single instance created at the top of the handler and shared across both paths would be cleaner and more efficient. [MEDIUM]
Other completed criteria
- API key loaded from environment variables via runtime config (
NUXT_PUBLIC_POSTHOG_PROJECT_TOKEN) - API host correctly configured via environment variables (
NUXT_PUBLIC_POSTHOG_HOST) - Server-side events use
withContextfor session/distinct ID linking posthog.shutdown()called after server-side captures- Returning user identification handled in plugin
loadedcallback
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
composables/useAuth.ts |
user_logged_in, user_logged_out |
Tracks login with method property, logout with session state |
server/api/auth/login.post.ts |
auth_login_succeeded, captureException |
Server-side login tracking and error capture |
server/api/auth/logout.post.ts |
auth_logout_completed |
Server-side logout tracking with cookie session flag |
pages/[type]/[id].vue |
media_detail_viewed |
Tracks media detail page views with type, ID, and recommendation presence |
pages/search.vue |
search_performed, captureException |
Tracks searches with query length and captures search errors |
components/media/Details.vue |
media_tab_selected |
Tracks tab switches with media context |
components/media/Hero.vue |
trailer_played |
Tracks trailer plays from hero section |
components/video/Card.vue |
trailer_played |
Tracks trailer plays from video cards with source differentiation |
error.vue |
captureException |
Captures Nuxt error page exceptions |
pages/login.vue |
captureException |
Captures login form exceptions |
plugins/posthog.client.ts |
captureException (via vue:error hook) |
Captures all Vue runtime errors |
Issues
- Search query not included in event: The
search_performedevent capturesquery_lengthbut omits the actual search term. While this avoids potential PII, including a sanitized or truncated query would improve product insights significantly. [LOW]
Other completed criteria
- Events represent real user actions (login, logout, search, media views, trailer plays, tab changes)
- Events enable product insights — login-to-media-detail funnel, search trends, trailer engagement by source
- Events include relevant properties (media_id, media_type, playback_source, login_method, etc.)
- No PII in event properties — username used as distinct_id (acceptable for this demo app), no emails/names in capture properties
- 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: wizard-pr
Trigger ID:
1776c51App:
nuxt/movies-nuxt-3-6App directory:
apps/nuxt/movies-nuxt-3-6Workbench branch:
wizard-ci-1776c51-nuxt-movies-nuxt-3-6Wizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-10T23:33:16.019Z
Duration: 313.3s
YARA Scanner