No PII is sent to analytics
Why it matters
Passing email addresses or full names as analytics user identifiers or event properties violates GDPR Art. 5(1)(c) (data minimisation) and OWASP A02 (Cryptographic Failures / data exposure). Most analytics platforms (GA4, Mixpanel) explicitly prohibit PII in their terms of service and will terminate accounts that send it. Beyond compliance, PII in analytics creates a data breach vector: analytics dashboards are typically accessible to more people than your production database, and data export APIs make the PII recoverable by anyone with dashboard access.
Severity rationale
Critical because PII in analytics events is both a GDPR Art. 5(1)(c) violation and a breach of analytics platform ToS — CWE-359 exposure that creates an additional data breach surface outside your production security controls.
Remediation
Replace every analytics.identify(user.email, ...) call with an opaque database ID. Audit all identify(), posthog.identify(), and gtag('set', 'user_properties', ...) calls in lib/analytics.ts and any component that wraps them:
// Wrong — sends PII to analytics platform:
analytics.identify(user.email, { plan: user.plan })
// Correct — opaque ID only:
analytics.identify(user.id, { plan: user.plan })
If your analytics workflow requires looking users up by email, do that mapping inside your own database — never pass the email to the analytics SDK. Scrub any existing event schemas that include email, name, phone, or address as properties.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Analytics & Tracking Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-359 — Exposure of Private Personal Information to an Unauthorized Actor
- owasp:2021 · A02 — Cryptographic Failures (sensitive data exposure)
- gdpr · Art. 5(1)(c) — Data minimisation principle
- soc2:2017 · CC6.7 — Restriction of information transmission, movement, and removal
Taxons
History
- 2026-04-18·v1.0.0·Initial import from marketing-analytics·automated
- 2026-07-06·v1.0.1·Add SOC 2 TSC mapping (CC6.7) from the verified compliance crosswalk register (docs/compliance/).·by soc2-mapping-enrichment-ship-2