Revert consent-gated PostHog capture#7884
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThree instrumentation client files transition from consent-gated, deferred PostHog initialization to static, immediate initialization. CookieYes consent checks, document readiness waits, opt-out defaults, and event listeners for consent updates are removed from all three apps. ChangesPostHog consent-gating removal across apps
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/blog/src/instrumentation-client.ts`:
- Around line 3-13: The PostHog initialization (posthog.init) now starts
capturing immediately because opt_out_capturing_by_default and the
consent-update handler were removed; restore consent gating by reintroducing
opt_out_capturing_by_default:true in the init options and/or delay enabling
capture inside the loaded callback until the CookieYes CMP confirms consent (use
posthog.has_opted_in_capturing() / posthog.opt_in_capturing() or keep
persistence:'memory' and call posthog.opt_in_capturing() when CookieYes emits
consent), ensuring the SDK does not send analytics for non-consenting visitors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: cb6d883b-383d-427b-a441-9a3443a90282
📒 Files selected for processing (3)
apps/blog/src/instrumentation-client.tsapps/docs/src/instrumentation-client.tsapps/site/src/instrumentation-client.ts
* Add compute page first stage * Update children * Update flex positioning * Update how-it-works * Update flex distance * Add globe hero to compute page * remove import * Improve fade in * Update cobeglobe performance * Add network component * Add network globe and fix build * Push no networkglobe * remove both globes * Add back globes and fix issues* * Remove hero globe * Fix globe hero * Update location/zone legend * Update how-it-works icons * Optimise animations * Update how it works * Add dynamic updates Update SEO Update how-it-works Update per reviews for mobile * Update live pulse * Update font families * update type * feat(docs): add compute docs content * docs(compue): fix builds * docs(compue): fix builds * Update fonts * Pretty text on title * Update icons * Update icons * Update fonts for <h2> and eyebrow * Update margin for 02/features * Update navbar * Update font-size for text 4xl and 5xl * feat(docs): add Netlify and Vercel Compute migration guides closes #7868 * feat(site): homepage rework * design rework * seo audit of homepage * adjust images * update * staging * clean up * copy(compute): align landing page copy with messaging skills + SEO (#7929) * copy(compute): align page copy with messaging skills Apply the Prisma communication skills (prisma-copy-review + prisma-product-messaging) to the Compute landing page copy. - Remove all em dashes from user-facing copy (page hero/meta, feature bullets, comparison card benefits, How-it-works tabs). - Cut fluff and vague intensifiers: "actually", "ultra-low latency", "grows into jobs", and the "felt as good as the code" line, which is reframed around the integrated-platform narrative from the positioning doc (fewer separate build/hosting/database tools). - Replace dramatic fragments ("Push code. It runs.", "Sockets stay open. Streams flow uninterrupted.") with single workflow sentences, and name the mechanism (long-lived process on Bun) in the hero/meta. - Fix a broken cross-reference ("See the AI workloads section above" — no such section exists). - Mark capabilities not yet covered by the Compute docs as "Coming soon": co-located database (feature card + bento + How-it-works tab) and reliability automation (auto scaling/recovery/OOM). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * copy(compute): second skill pass on empty language + SEO Drop the "Coming soon" markers and tighten remaining empty language, plus SEO fields. - Remove "Coming soon" badges/label (co-located feature card, two bento cards, How-it-works tab). - Empty/slogan language replaced with concrete claims: - "Compute keeps it all together." -> "One service for your app, assets, and jobs." (matches the comparison cards below it) - "No runtime constraints." -> "not a constrained edge runtime" - SEO: page title and OG title now carry the primary keyword phrase ("Deploy TypeScript apps to production") instead of the bare brand name; meta description tightened under ~155 chars; OG image alt made descriptive. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * copy(compute): adjust AI-agent card to avoid co-location claim The "Building an AI agent?" card carried a green YES badge while claiming "co-located memory", which reads as an availability promise for the database co-location story. Reword to "in-process memory", which describes the long-lived stateful runtime the page already presents as available, so the card no longer implies co-location availability. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- * copy(site): align touched marketing pages with messaging skills (#7930) * copy(site): align touched marketing pages with messaging skills Apply the Prisma communication skills (prisma-copy-review + prisma-product-messaging) to the user-facing copy on the marketing pages that PR #7859 touches. Copy-only edits; no structural, logic, or factual/pricing changes. - Remove em/en dashes from prose (startups testimonial + body, etc.). - Cut fluff, empty slogans, and vague intensifiers (seamless, powerful, "ship with confidence", "stay ahead in the game", "peak performance", "ultimate tool", "scale without limits", "core competencies", ...) and replace with concrete workflow/outcome language. - Fix mid-sentence capitalization (Build, Fortify, Grows, Pricing, Database) and tighten run-ons. - Correct product naming: Prisma Accelerate, Prisma Console (was "Prisma Data Platform"/"Platform Console"), VS Code (was VSCode), Management API; "Prisma ORM" instead of "the Prisma ORM". Pages: orm, postgres, enterprise, mcp, startups, query-insights, partners, community, ecosystem, studio. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * copy(site): make homepage + footer product naming consistent Align the homepage and footer with the positioning doc so all three core products (Prisma ORM, Prisma Postgres, Prisma Compute) are named and reachable consistently. - Hero: name Prisma ORM, Prisma Postgres, and Prisma Compute in the subhead (was generic "managed Postgres"/"production-ready compute"), add the missing Prisma Postgres CTA, and rename "Explore Compute" to "Explore Prisma Compute". Hero now offers all three product CTAs. - "Start with Prisma" footer-CTA section: add the missing Prisma Compute CTA so all three products are reachable. - Platform-path card: "Explore Compute" -> "Explore Prisma Compute". - Footer Product column: add Prisma Postgres and Prisma Compute (were missing) and use full "Prisma ORM" naming. - Site metadata description: name the three products. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * copy(site): single console CTA on homepage + compute heroes - Homepage hero: replace the three Explore product buttons with one primary "Try Prisma" CTA linking to the Console (pris.ly/pdp, utm_campaign=home); move the product links below the CTA as secondary text links (Prisma ORM / Prisma Postgres / Prisma Compute). - Compute hero: replace "Deploy a template" + "Read the docs" with one "Try Prisma Compute" CTA linking to the Console (utm_campaign=compute). - Homepage subhead: "production-ready compute" -> "serverless TypeScript compute" per messaging guidance (Compute production readiness needs caution). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(site): align compute + homepage copy, nav, and CTAs with messaging - Hero: lead with the stitched-stack problem, name the integrated platform once, and collapse to a single console CTA (drop secondary product links) - Footer CTA: one primary "Try it out in the Console" action (pris.ly/pdp) - Remove the duplicate "Run TypeScript the way it actually works" section - Nav (site + blog): move Compute to the top of Products, fix wrong ORM description copied from Postgres - Compute: use "@prisma/cli@latest app deploy" instead of "prisma deploy" - Compute: point launch post at pris.ly/compute-blog-pb and docs at pris.ly/compute-docs, both with standardised UTM params Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * copy(site): retitle hero, tighten subhead, fix deploy domain in animation - Hero title: "One Platform for Your TypeScript App" (was "A Database Platform for TypeScript Developers"); structured-data name kept in sync - Tighten hero subhead: drop the second product re-listing, collapse to "Prisma brings all three into one platform, from schema to production" - Compute deploy animation: service URLs now use the real <service>.iad1.prisma.build domain instead of *.prisma.run Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(site): adopt main's revert of consent-gated PostHog capture The merge conflict resolution kept the branch's consent-gated init, but that code was inherited shared code (#7864) only reformatted on this branch, and main deliberately reverted it in #7884. Take main's version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(site): refine Prisma Compute messaging and landing page for beta Apply Luan's feedback to the Compute page, landing page, and pricing page: - Soften beta overclaims: drop absolute "no cold starts / timeouts / connection limits", remove production framing, frame WebSockets, cron, and background jobs as Coming soon - Reframe DB pairing as "auto-wiring where the app/database relationship is clear"; co-locate copy now says "same box" - Compute hero: "Deploy TypeScript apps on Prisma Compute"; fluid clamp sizing so long words no longer clip on mobile (also landing hero) - Starter apps: real `bunx create-prisma@latest --template ...` commands with a copy-to-clipboard button; drop the GitHub-repo CTA - Coming-soon badge gets an on-brand teal/sparkles treatment - Fix light-mode CLI command contrast and the landing Compute card's text overlapping its illustration - Landing: move Explore buttons below the visuals (new CardSection visualFooter slot); merge the intro sections; add Explore ORM/Postgres buttons; remove pricing absolutes - Pricing: add a Prisma Compute note (Public Beta, pricing soon) - Home title aligned to positioning: "Integrated TypeScript Infrastructure for Agentic Software Development" Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(site): align landing hero with positioning doc Lead the homepage hero with the canonical positioning (positioning.md §5): "Integrated TypeScript infrastructure for developers building with AI agents", with the build/deploy/iterate end-to-end subhead. Update the CollectionPage structured-data name to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(site): hero spacing and align landing Explore CTAs - Loosen the hero headline line-height and trim its size so the longer "Integrated TypeScript infrastructure…" copy no longer looks cramped; give the hero stack more vertical breathing room - Move the Prisma Postgres "Explore" button inside the illustration box (bottom-left), matching the Prisma Compute card Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(site): landing CTA sizing/alignment and tighter section spacing - Prisma Postgres Explore button: align to start so it sizes to its content (matching the Compute button) instead of stretching full-width - Center the Prisma ORM Explore button under the logo grid - Make CardSection per-row spacing configurable and tighten the landing product rows; reduce landing section spacing so the page reads less empty Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(site): Postgres card button spacing and tighter hero gap - Give the Prisma Postgres illustration its own flex region above the Explore button so the button no longer crowds the database art - Reduce the hero bottom padding and the logo-parade band so there is less empty space between the hero and the first content section Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(site): equal-height comparison cards in "What makes it unique" Stretch the two cards to the same height (items-stretch + h-full) and let each card's services panel grow to fill, so the fragmented and unified cards stay balanced instead of one running taller than the other. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(site): style starter-app commands as code snippets Give each starter command a bordered, shaded snippet block, shrink the font to text-xs, and keep it on one line (nowrap with horizontal scroll for the longest), instead of unstyled text wrapping across two lines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(site): make Compute deploy copy coherent and tab cursor Lead with the CLI deploy command everywhere and present connecting a GitHub branch as the optional push-to-deploy follow-on (run the CLI, then connect GitHub), instead of mixing CLI-first, git-first, and "CLI or GitHub" framings. Add cursor-pointer to the How-it-works tabs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Update apps/site/src/app/pricing/pricing-page-content.tsx * chore: remove compute docs from PR, keep web changes Compute docs are covered by main (#7931, #7934). Drop this branch's compute docs (content/docs/compute reverted to main, content/docs/cli/compute removed, orphaned bun.svg and cspell entries reverted). Keep apps/site web changes and cross-app typography work. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Carla Goncalves <goncalves@prisma.io> Co-authored-by: Mike Hartington <mikehartington@gmail.com> Co-authored-by: Aidan McAlister <aidankmcalister@gmail.com> Co-authored-by: Mike Hartington <mhartington@users.noreply.github.com> Co-authored-by: Ankur Datta <64993082+ankur-arch@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
#7864Why
The merged SEO branch changed analytics collection semantics:
opt_out_capturing_by_default: truewindow.loadThat is not an SEO improvement and it makes current visitor metrics non-comparable with the previous baseline. It appears to be the most likely cause of the sudden drop in the top-line visitor dashboard after merge.
Notes
This PR only reverts the PostHog tracking behavior.
The separate docs SEO issue around
noindexon Accelerate caching / connection-pooling pages still needs its own fix.Summary by CodeRabbit
Release Notes