Skip to content

Turn cookie banner off (keep analytics running) - #93

Open
lksbrssr wants to merge 1 commit into
mainfrom
chore/disable-cookie-banner
Open

Turn cookie banner off (keep analytics running)#93
lksbrssr wants to merge 1 commit into
mainfrom
chore/disable-cookie-banner

Conversation

@lksbrssr

Copy link
Copy Markdown
Collaborator

Ready-to-merge switch that hides the cookie-consent banner while keeping Google Analytics running (cookies still set). Not urgent — opening it so it is ready whenever you want to flip the banner off.

What changes

  • src/lib/cookie-consent.tsCOOKIE_CONSENT_ENABLED now defaults off (=== 'on' instead of !== 'off').
  • .env.example + README.md — docs updated to match the new default.

Behaviour when merged

  • No consent banner, no footer "Cookie settings" link.
  • layout.tsx already loads <GoogleAnalytics> directly when the banner is disabled, so GA keeps collecting (cookies still set) whenever NEXT_PUBLIC_GA_ID is present.
  • Consent-flow code is left fully intact.

To turn the banner back on

Set the Vercel env var NEXT_PUBLIC_COOKIE_CONSENT=on, or revert this one-line default flip.

⚠️ Note on the Vercel env var: if NEXT_PUBLIC_COOKIE_CONSENT is currently set to on in Vercel, merging this PR alone will not hide the banner — the explicit env value wins over the code default. Unset it (or set it to off) in Vercel too. If it is unset (likely, since #85 relied on the code default), merging is enough.

Flip COOKIE_CONSENT_ENABLED to default OFF: no consent banner and no
footer 'Cookie settings' link, but Google Analytics still loads directly
(cookies are still set) whenever NEXT_PUBLIC_GA_ID is present.

The consent flow is left fully intact — set NEXT_PUBLIC_COOKIE_CONSENT=on
(env var) to bring the banner back, or revert this one-line default flip.
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
plrd.org Ready Ready Preview, Comment Jul 28, 2026 9:43am

Request Review

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.

1 participant