Skip to content

Add GA4 tracking with GDPR cookie consent banner#42

Merged
dcmcand merged 2 commits into
nebari-dev:mainfrom
khuyentran1401:feat/cookie-consent
Apr 16, 2026
Merged

Add GA4 tracking with GDPR cookie consent banner#42
dcmcand merged 2 commits into
nebari-dev:mainfrom
khuyentran1401:feat/cookie-consent

Conversation

@khuyentran1401

@khuyentran1401 khuyentran1401 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Description

Adds Google Analytics (GA4) tracking to the skillsctl docs 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.

@dcmcand dcmcand merged commit e80d759 into nebari-dev:main Apr 16, 2026
5 checks passed
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