Skip to content

Website: Google Analytics (opt-in), cookie consent, privacy policy - #39

Merged
bpacholek merged 1 commit into
mainfrom
feat/site-analytics
Jul 7, 2026
Merged

bpacholek merged 1 commit into
mainfrom
feat/site-analytics

Conversation

@bpacholek

Copy link
Copy Markdown
Contributor

Adds opt-in Google Analytics, a cookie consent box, and a privacy policy to the Gentastic website, matching the approach on the NUTS and Helena sites.

What this does

  • Google Analytics 4 (G-NG335XP03E) with a prior-consent model. gtag.js is injected only after the visitor presses Accept (or returns with a stored, unexpired granted choice). Reject or no choice means nothing is ever loaded or sent to Google. The GA snippet is production-only (gated on jekyll.environment), so local dev builds never load it.
  • Cookie consent banner with Accept / Reject, a 180-day re-ask, and a footer Cookie preferences control to withdraw or change the choice. It reuses the site's existing button and surface styles.
  • Privacy and Cookies page at /privacy/, linked from the footer. Plain-language and GDPR-oriented: data controller, what is collected, the prior-consent model, the exact cookies and retention, legal basis, international transfer, and how to opt out.

Notes

  • Merging this to main deploys it live via the Pages workflow, at which point the consent banner appears and analytics can load after consent. Analytics stays fully off until a visitor accepts.
  • Verified with a production Jekyll build: the banner, consent controller, footer link, and privacy page all render; the privacy cookie table renders correctly; and a development build contains zero GA references (the production guard works).

🤖 Generated with Claude Code

…olicy

Matches the approach used on the NUTS and Helena sites.

- Google Analytics 4 (G-NG335XP03E) with a prior-consent model: gtag.js is
  injected only after the visitor Accepts (or returns with a stored, unexpired
  'granted' choice). Reject or no choice means nothing is sent to Google.
  Production builds only (_includes/analytics.html, gated on jekyll.environment).
- Cookie consent banner (_includes/consent.html + assets/js/consent.js): Accept
  or Reject, a 180-day re-ask, and a footer "Cookie preferences" control to
  withdraw or change the choice. Uses the site's own button styles.
- Privacy and Cookies page (privacy.md, /privacy/) plus a footer Privacy link.
  Plain-language, GDPR-oriented: controller, what is collected, prior consent,
  the exact cookies, legal basis, transfers, and how to opt out.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bpacholek
bpacholek merged commit 1b5ba26 into main Jul 7, 2026
3 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.

1 participant