Skip to content

Add GA4 tracking with GDPR cookie consent banner#669

Merged
dharhas merged 1 commit intonebari-dev:mainfrom
khuyentran1401:feat/cookie-consent
Apr 16, 2026
Merged

Add GA4 tracking with GDPR cookie consent banner#669
dharhas merged 1 commit intonebari-dev:mainfrom
khuyentran1401:feat/cookie-consent

Conversation

@khuyentran1401
Copy link
Copy Markdown
Contributor

@khuyentran1401 khuyentran1401 commented Apr 15, 2026

Description

Adds Google Analytics (GA4) tracking to this site, gated behind a GDPR-compliant cookie consent banner. GA4 sets cookies that track visitors, so EU privacy law requires opt-in consent before any tracking fires.

What does this implement/fix?

  • New feature (non-breaking change which adds a feature)

What's included

  • Analytics: GA4 via the shared Nebari property.
  • Consent: opt-in banner gating all tracking.
  • Privacy-by-default: no cookies set until the user accepts.

Expected behavior

  • On first visit, a consent banner appears in the bottom-right corner and no GA4 cookies are set.
  • Two categories are exposed: Strictly necessary (always on) and Analytics (opt-in, controls GA4).
  • Clicking Accept all enables GA4 tracking and remembers the choice.
  • Clicking Reject all keeps tracking disabled; the banner does not reappear.
  • Users can reopen Manage preferences later to change their choice, and GA4 updates immediately.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 15, 2026

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

Project Deployment Actions Updated (UTC)
jhub-apps Ready Ready Preview, Comment Apr 15, 2026 3:57am

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 15, 2026

@khuyentran1401 is attempting to deploy a commit to the nebari-jhub-apps Team on Vercel.

A member of the Team first needs to authorize it.

@dharhas dharhas merged commit af72b9b into nebari-dev:main Apr 16, 2026
24 of 25 checks passed
@khuyentran1401 khuyentran1401 deleted the feat/cookie-consent branch April 16, 2026 02:58
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