Why this matters
LGPD requires purpose limitation and data minimization; pseudonymization reduces re-identification risk.
Do not send direct identifiers (email, CPF) to analytics. Use an HMAC-based pseudonymous ID derived from user ID and a rotating key; never reversible without server secret.
LGPD requires purpose limitation and data minimization; pseudonymization reduces re-identification risk.
Side-by-side examples engineers can pattern-match during review.
Analytics.track('login', email: current_user.email)rotating_key = ENV.fetch('ANON_KEY')\nanon_id = OpenSSL::HMAC.hexdigest('SHA256', rotating_key, current_user.id.to_s)\nAnalytics.track('login', anon_id: anon_id)OpenSSL::HMAC.hexdigest('SHA256', key, uid)Analytics.track('login', email: user.email)From the same buckets as this rule.