Skip to content

Commit a087d3b

Browse files
jp-ayyappanclaude
andauthored
feat(docs): add Google Analytics with privacy-compliant cookie consent (#174)
## Summary Adds Google Analytics tracking to the OpenTDF documentation site with full GDPR/CCPA compliance through: - Opt-in cookie consent banner - Privacy Policy, Cookie Policy, and Terms of Service pages (leveraging Virtru's legal language) - Legal section in footer ## Changes - ✅ Cookie consent banner using `react-cookie-consent` - Only loads Google Analytics after user accepts cookies - Decline option available - Preference saved for 365 days - ✅ IP anonymization enabled for GDPR compliance - ✅ Privacy Policy page (`/privacy-policy`) - ✅ Cookie Policy page (`/cookie-policy`) - ✅ Terms of Service page (`/terms-of-service`) - ✅ Legal footer section with links to all policy pages - ✅ Fix: Getting Started page title in sidebar (was showing "index") ## Privacy & Legal Compliance - **GDPR Compliant**: Opt-in consent, IP anonymization, user rights documented - **CCPA Compliant**: Privacy policy includes California resident rights - **No Personal Data Sales**: Explicit commitment in policies - **Contact Information**: Uses Virtru contact details ([email protected]) ## Testing - ✅ Build succeeds locally - ✅ Cookie banner appears on first visit - ✅ Analytics only loads after acceptance - ✅ All policy pages render correctly - ✅ Footer links work - ✅ No broken links or build warnings ## Screenshots The cookie consent banner appears at the bottom of all pages with Accept/Decline options and links to privacy policies. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.5 <[email protected]>
1 parent b39db23 commit a087d3b

File tree

9 files changed

+2399
-292
lines changed

9 files changed

+2399
-292
lines changed

docs/getting-started/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
slug: /getting-started
3+
title: Getting Started
4+
sidebar_label: Getting Started
35
---
46

57
import dockerComposeContent from '!!raw-loader!./docker-compose.yaml';

docusaurus.config.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const config: Config = {
3636
trailingSlash: false,
3737
customFields: {
3838
javaSdkVersion,
39+
googleGtagId: 'G-JH0PNJK88L',
3940
},
4041

4142
// GitHub pages deployment config.
@@ -178,6 +179,23 @@ const config: Config = {
178179
},
179180
],
180181
},
182+
{
183+
title: "Legal",
184+
items: [
185+
{
186+
label: "Privacy Policy",
187+
to: "/privacy-policy",
188+
},
189+
{
190+
label: "Cookie Policy",
191+
to: "/cookie-policy",
192+
},
193+
{
194+
label: "Terms of Service",
195+
to: "/terms-of-service",
196+
},
197+
],
198+
},
181199
],
182200
copyright: `
183201
<span>Copyright © ${new Date().getFullYear()} OpenTDF</span>

0 commit comments

Comments
 (0)