Skip to content

[CI] (38ef7e6) astro/astro-static-marketing - #2586

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-38ef7e6-astro-astro-static-marketing
Closed

wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-38ef7e6-astro-astro-static-marketing

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: wizard-pr
Trigger ID: 38ef7e6
App: astro/astro-static-marketing
App directory: apps/astro/astro-static-marketing
Workbench branch: wizard-ci-38ef7e6-astro-astro-static-marketing
Wizard branch: release-please--branches--main--components--wizard
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-07-09T19:06:10.324Z
Duration: 429.3s

YARA Scanner

✓ 36 tool calls scanned, 0 violations detected

No violations: ✓ 36 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown
Author

PR Evaluation Report

Summary

This PR integrates PostHog into an Astro static marketing site ("NeuralFlow AI") using the HTML snippet approach via a reusable posthog.astro component. The component is included in the shared layout's <head>, and custom event tracking is added to four pages/components for CTA clicks, pricing plan selections, docs section clicks, and navigation link clicks.

Files changed Lines added Lines removed
8 +105 -12

Confidence score: 4/5 👍

  • No error tracking implemented: No captureException, error boundary, or exception autocapture configured. [MEDIUM]
  • No reverse proxy configured: Client-side PostHog requests are exposed to ad blockers with no proxy setup. [MEDIUM]
  • Unnecessary posthog-js npm dependency: The PR installs posthog-js in package.json but never imports it — initialization uses the HTML snippet exclusively. The package is dead weight. [LOW]
  • Outdated snippet and defaults version: The snippet uses the older format (s.api_host+"/static/array.js" instead of the current -assets.i.posthog.com CDN path), and defaults is set to '2026-01-30' rather than the latest '2026-05-30'. [LOW]

File changes

Filename Score Description
src/components/posthog.astro 3/5 New PostHog snippet component using is:inline with define:vars for env vars. Uses older snippet format and defaults version.
src/layouts/Layout.astro 5/5 Imports and renders PostHog component in <head> — correct placement per Astro docs.
src/pages/index.astro 5/5 Adds cta_clicked event tracking on hero CTA buttons with enriched properties.
src/pages/pricing.astro 5/5 Adds pricing_plan_selected tracking with plan name and CTA text via data attributes.
src/pages/docs.astro 5/5 Adds docs_section_clicked tracking with section names via data attributes.
src/components/Navigation.astro 5/5 Adds nav_link_clicked tracking for all nav links with link text.
package.json 3/5 Adds posthog-js dependency that is never imported (snippet loads SDK from CDN).
posthog-setup-report.md 4/5 Comprehensive setup report with event table and next steps.

App sanity check ✅

Criteria Result Description
App builds and runs Yes All scripts use is:inline, no TS processing issues expected. HTML snippet approach is safe.
Preserves existing env vars & configs Yes Only additive changes; existing page content, styles, and config preserved.
No syntax or type errors Yes All inline scripts are valid JavaScript. define:vars usage is correct for Astro.
Correct imports/exports Yes Layout correctly imports posthog.astro component.
Minimal, focused changes Yes All changes are PostHog-related. Data attributes added to existing elements are minimal.
Pre-existing issues None —

Issues

  • Unnecessary posthog-js dependency: posthog-js is added to package.json but never imported anywhere — the SDK is loaded via the HTML snippet from PostHog's CDN. This adds ~200KB of unused dependency. Remove from package.json or switch to the npm import approach. [LOW]
  • Environment variables not documented: PUBLIC_POSTHOG_PROJECT_TOKEN and PUBLIC_POSTHOG_HOST are used but no .env.example is created or updated. The setup report mentions this as a TODO. [LOW]

Other completed criteria

  • All changes relate to PostHog integration
  • Correct files modified for Astro framework (component, layout, pages)
  • Code follows existing codebase patterns (inline scripts, Astro component conventions)
  • Build configuration is valid

PostHog implementation ⚠️

Criteria Result Description
PostHog SDKs installed Yes HTML <script> snippet loads PostHog from CDN. Also has posthog-js in package.json (redundant but valid).
PostHog client initialized Yes posthog.init() called in posthog.astro with API key and host from env vars via define:vars.
capture() Yes Four distinct capture() calls across pages: cta_clicked, pricing_plan_selected, docs_section_clicked, nav_link_clicked.
identify() No No identify() call present. This is a static marketing site with no auth flow, but no identification mechanism exists.
Error tracking No No error tracking configured — no captureException, no error listeners, no capture_exceptions config option.
Reverse proxy No No reverse proxy configured. Client-side requests go directly to us.i.posthog.com.

Issues

  • No error tracking: No exception capture mechanism is set up. For an Astro static site, adding capture_exceptions: true to the init config or a global error listener would suffice. [MEDIUM]
  • No reverse proxy: PostHog requests are sent directly to us.i.posthog.com, making them susceptible to ad blockers on this marketing site where tracking reliability matters. [MEDIUM]
  • Outdated defaults version: Uses defaults: '2026-01-30' instead of the current '2026-05-30'. This may miss newer default configuration improvements. [LOW]
  • Outdated snippet format: The snippet uses s.api_host+"/static/array.js" for the script source. The current docs use s.api_host.replace(".i.posthog.com", "-assets.i.posthog.com") + "/static/array.js" which routes through the assets CDN. [LOW]

Other completed criteria

  • API key loaded from environment variable (PUBLIC_POSTHOG_PROJECT_TOKEN) — not hardcoded
  • API host loaded from environment variable with correct fallback to https://us.i.posthog.com
  • Uses is:inline directive as required by Astro docs
  • PostHog component correctly placed in Layout <head> so all pages are instrumented
  • Uses window.posthog?.capture() with optional chaining for safe access

PostHog insights and events ✅

Filename PostHog events Description
src/pages/index.astro cta_clicked Tracks hero CTA button clicks with cta_text and cta_location properties
src/pages/pricing.astro pricing_plan_selected Tracks pricing plan selection with plan name and cta_text
src/pages/docs.astro docs_section_clicked Tracks documentation section card clicks with section name
src/components/Navigation.astro nav_link_clicked Tracks navigation link clicks with link_text

Issues

No issues with event quality.

Other completed criteria

  • Events represent real user actions on a marketing site (CTA clicks, pricing selection, docs browsing, navigation)
  • Events enable product insights — can build CTA→pricing funnels, track most popular docs sections, analyze navigation patterns
  • All events include relevant contextual properties (text, location, plan name, section)
  • No PII in event properties — only UI element labels and identifiers
  • Event names are descriptive, consistent snake_case, and clearly describe the user action

Reviewed by wizard workbench PR evaluator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants