Repository navigation
[CI] (3f7863c) astro/astro-view-transitions-marketing - #2386
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
wizard-ci-bot[bot] wants to merge 1 commit into
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog into an Astro marketing site with View Transitions (ClientRouter) support. It adds a
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | No syntax errors or type issues; is:inline correctly prevents Astro TS processing |
| Preserves existing env vars & configs | Yes | Existing code and configs preserved; only PostHog additions |
| No syntax or type errors | Yes | All scripts use valid syntax; define:vars correctly passes env vars |
| Correct imports/exports | Yes | PostHog component import in Layout.astro is correct |
| Minimal, focused changes | Yes | All changes relate to PostHog integration |
| Pre-existing issues | None | Base app is clean |
Issues
- No
.env.examplefile:PUBLIC_POSTHOG_PROJECT_TOKENandPUBLIC_POSTHOG_HOSTare required but not documented in a committed.env.examplefile. Add one so collaborators know which variables to set. [MEDIUM] - Unnecessary
posthog-jsin package.json: The integration uses the HTML snippet (loaded from CDN), soposthog-jsin dependencies is unused. It won't break anything but adds unnecessary weight. [LOW]
Other completed criteria
.envadded to.gitignoreto prevent committing secrets- Build configuration (package.json) is valid
- All
is:inlinedirectives correctly applied per Astro framework rules
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | HTML snippet in posthog.astro loads SDK from CDN; posthog-js also in package.json (redundant but valid) |
| PostHog client initialized | Yes | Initialized via snippet with __posthog_initialized guard for View Transitions, capture_pageview: 'history_change' for soft navigation tracking |
| capture() | Yes | 10 meaningful capture calls across pages and components |
| identify() | N/A | Static marketing site with no authentication system — no user identity to link |
| Error tracking | No | No captureException, startExceptionAutocapture(), or exception autocapture config |
| Reverse proxy | No | No reverse proxy configured; client-side PostHog requests may be blocked by ad blockers |
Issues
- No error tracking: No exception autocapture or
captureExceptionsetup. Addcapture_exceptions: trueto theposthog.init()config or callposthog.startExceptionAutocapture(). [MEDIUM] - No reverse proxy: Client-side PostHog is exposed to ad blockers. Configure a reverse proxy (Cloudflare, Vercel rewrites, or PostHog managed proxy) and update
api_host. [MEDIUM] - Older snippet version: The snippet uses
s.api_host+"/static/array.js"instead of the recommendeds.api_host.replace(".i.posthog.com", "-assets.i.posthog.com") + "/static/array.js"pattern for asset loading. [LOW] - Stale defaults date:
defaults: '2026-01-30'should be'2026-05-30'per current docs. [LOW]
Other completed criteria
- API key loaded from
PUBLIC_POSTHOG_PROJECT_TOKENenv var (not hardcoded) - API host loaded from
PUBLIC_POSTHOG_HOSTenv var with fallback tohttps://us.i.posthog.com - View Transitions initialization guard prevents stack overflow
capture_pageview: 'history_change'correctly handles soft navigation pageview trackingis:inlinedirective used on all script tags per Astro framework rulesPUBLIC_prefix used for client-side env vars per Astro conventions
PostHog insights and events ⚠️
| Filename | PostHog events | Description |
|---|---|---|
src/pages/index.astro |
hero_trial_cta_clicked, hero_docs_cta_clicked |
Tracks hero section CTA engagement — top of funnel |
src/components/Navigation.astro |
nav_get_started_clicked |
Tracks navigation CTA clicks |
src/pages/pricing.astro |
pricing_page_viewed, starter_plan_cta_clicked, pro_trial_cta_clicked, enterprise_contact_sales_clicked |
Pricing funnel: page view → plan selection. Enriched with plan name and price. |
src/pages/features.astro |
features_page_viewed |
Tracks feature page interest |
src/pages/docs.astro |
docs_section_clicked |
Tracks documentation section engagement with section name |
src/components/Footer.astro |
footer_link_clicked |
Tracks footer navigation with link name property |
Issues
- Duplicate page view events on initial load:
pricing_page_viewedandfeatures_page_viewedfire twice on initial page load. BothDOMContentLoadedandastro:page-loadtrigger the setup function which immediately callscapture(). Fix by only usingastro:page-load(which fires on both initial and soft navigations) or adding a deduplication guard. [MEDIUM]
Other completed criteria
- Events represent real user actions mapped to actual product flows (CTA clicks, page views, plan selection)
- Events enable product insights — pricing funnel (page view → plan CTA), docs engagement, feature interest
- Events include relevant properties (plan name, price, section name, link name)
- No PII in event properties
- Consistent snake_case naming convention with descriptive action names
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:
3f7863cApp:
astro/astro-view-transitions-marketingApp directory:
apps/astro/astro-view-transitions-marketingWorkbench branch:
wizard-ci-3f7863c-astro-astro-view-transitions-marketingWizard branch:
posthog-code/pi-telemetry-parityContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-03T14:08:27.082Z
Duration: 438.0s
YARA Scanner