Turn cookie banner off (keep analytics running) - #93
Open
lksbrssr wants to merge 1 commit into
Open
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
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.ts—COOKIE_CONSENT_ENABLEDnow defaults off (=== 'on'instead of!== 'off')..env.example+README.md— docs updated to match the new default.Behaviour when merged
layout.tsxalready loads<GoogleAnalytics>directly when the banner is disabled, so GA keeps collecting (cookies still set) wheneverNEXT_PUBLIC_GA_IDis present.To turn the banner back on
Set the Vercel env var
NEXT_PUBLIC_COOKIE_CONSENT=on, or revert this one-line default flip.