Commit a087d3b
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- docs/getting-started
- src
- css
- pages
- theme
9 files changed
+2399
-292
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
181 | 199 | | |
182 | 200 | | |
183 | 201 | | |
| |||
0 commit comments