Skip to content

Revert consent-gated PostHog capture#7884

Merged
mhessdev merged 2 commits into
mainfrom
codex/revert-posthog-consent
May 8, 2026
Merged

Revert consent-gated PostHog capture#7884
mhessdev merged 2 commits into
mainfrom
codex/revert-posthog-consent

Conversation

@mhessdev

@mhessdev mhessdev commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • revert the PostHog consent-gating / opt-out-by-default behavior introduced in #7864
  • restore immediate PostHog initialization on site, blog, and docs
  • remove the extra CookieYes-driven opt-in/out event handling from PostHog capture

Why

The merged SEO branch changed analytics collection semantics:

  • opt_out_capturing_by_default: true
  • site/blog delayed init until window.load
  • capture only resumed after CookieYes analytics consent

That 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 noindex on Accelerate caching / connection-pooling pages still needs its own fix.

Summary by CodeRabbit

Release Notes

  • Chores
    • Refactored analytics initialization across applications to start immediately at module load rather than deferring to page load. Simplified consent configuration handling and removed deferred initialization dependencies to improve application startup performance.

@vercel

vercel Bot commented May 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment May 8, 2026 0:27am
docs Ready Ready Preview, Comment May 8, 2026 0:27am
eclipse Ready Ready Preview, Comment May 8, 2026 0:27am
site Ready Ready Preview, Comment May 8, 2026 0:27am

Request Review

@coderabbitai

coderabbitai Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Three 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.

Changes

PostHog consent-gating removal across apps

Layer / File(s) Summary
New static PostHog initialization
apps/blog/src/instrumentation-client.ts, apps/docs/src/instrumentation-client.ts, apps/site/src/instrumentation-client.ts
All three apps now import posthog-js statically and call posthog.init() immediately at module load time with api_host, capture_pageview: "history_change", and a defaults timestamp. The loaded callback registers site_name and environment.
Removed consent-gated initialization
apps/blog/src/instrumentation-client.ts, apps/docs/src/instrumentation-client.ts, apps/site/src/instrumentation-client.ts
Removed dynamic imports, document readiness waits, CookieYes hasAnalyticsConsent checks, opt_out_capturing_by_default configuration, cookieyes-consent-update event listeners, and posthog.opt_in_capturing()/posthog.opt_out_capturing() calls. PostHog no longer gates initialization or capture based on analytics cookie consent.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Revert consent-gated PostHog capture' directly and accurately describes the main change—reverting consent-gating from PostHog analytics across all three instrumentation files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@argos-ci

argos-ci Bot commented May 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - May 8, 2026, 12:34 PM

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6f3c41d and 80d7d7c.

📒 Files selected for processing (3)
  • apps/blog/src/instrumentation-client.ts
  • apps/docs/src/instrumentation-client.ts
  • apps/site/src/instrumentation-client.ts

Comment thread apps/blog/src/instrumentation-client.ts
@mhessdev mhessdev merged commit 7fe85cd into main May 8, 2026
16 checks passed
@mhessdev mhessdev deleted the codex/revert-posthog-consent branch May 8, 2026 12:44
ankur-arch added a commit that referenced this pull request Jun 4, 2026
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>
ankur-arch added a commit that referenced this pull request Jun 10, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants