Analytics tracking can be disabled by user
Why it matters
GDPR Art. 7(3) grants users the right to withdraw consent at any time, and withdrawal must be as easy as giving consent. CCPA §1798.120 grants California consumers the right to opt out of the sale or sharing of personal information. An analytics opt-out toggle that exists in Settings but does not actually stop data collection is deceptive — and regulators have specifically targeted this pattern, where consent signals are recorded but not enforced. The ePrivacy Directive Art. 5(3) further requires that tracking cookies or equivalent tracking mechanisms require prior consent in EU member states. An analytics SDK that runs regardless of the user's stored preference treats user choice as cosmetic.
Severity rationale
Low because the user retains visibility of the broken opt-out, and enforcement requires regulators to test the feature — but a non-functional opt-out is a direct GDPR Art. 7(3) and CCPA §1798.120 violation.
Remediation
Implement the opt-out as a gate on the analytics call site, not just a stored preference. The SDK must not send any event when analyticsEnabled is false.
import AsyncStorage from '@react-native-async-storage/async-storage'
export async function trackEvent(name: string, props?: Record<string, unknown>) {
const pref = await AsyncStorage.getItem('analyticsOptOut')
if (pref === 'true') return // User opted out — do not send
analytics.track(name, props)
}
// In Settings screen
async function handleOptOutToggle(optOut: boolean) {
await AsyncStorage.setItem('analyticsOptOut', String(optOut))
if (optOut) {
analytics.reset() // Flush queued events and clear identity
}
}
Also call analytics.reset() on opt-out to flush any queued events and disassociate the device ID — some SDKs batch events and will send opted-out data if only initialization is gated.
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 Mobile Permissions & Privacy Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- gdpr · Art. 7(3) — Right to withdraw consent
- ccpa · §1798.120 — Right to opt-out of sale
- eprivacy · Art. 5(3) — Confidentiality of communications / cookie consent
Taxons
History
- 2026-04-18·v1.0.0·Initial import from mobile-permissions-privacy·automated