Application honors Global Privacy Control (GPC) browser signal
Why it matters
The California Attorney General's 2022 enforcement guidance confirmed that businesses must treat the Global Privacy Control (GPC) signal as a valid opt-out of sale and sharing under CCPA § 1798.120. GPC is a browser-level HTTP header (Sec-GPC: 1) and JavaScript property (navigator.globalPrivacyControl) sent automatically by Brave, Firefox with privacy settings, and the Privacy Badger extension. If your middleware doesn't read this header before any third-party pixels initialize, you are sharing PI with advertising platforms before the consumer's opt-out signal is honored — a per-page-load violation. Unlike a manual opt-out form, GPC arrives on every qualifying request without any user action on your site.
Severity rationale
High because GPC is a legally mandated opt-out signal under CCPA § 1798.120 — failing to honor it has the same legal weight as ignoring a manually submitted opt-out form, and it affects all GPC-enabled browsers automatically.
Remediation
Implement GPC detection in middleware.ts so the opt-out cookie is set before any client JavaScript runs, then gate all pixel initialization on the combined preference check.
// middleware.ts — intercept GPC before client-side code loads
import { NextRequest, NextResponse } from 'next/server'
export function middleware(req: NextRequest) {
const gpc = req.headers.get('Sec-GPC')
const response = NextResponse.next()
if (gpc === '1') {
response.cookies.set('ccpa_opt_out', '1', {
path: '/', maxAge: 60 * 60 * 24 * 365, sameSite: 'lax',
})
}
return response
}
// lib/analytics.ts — combined GPC + cookie check
function isOptedOut(): boolean {
if (typeof navigator !== 'undefined' && navigator.globalPrivacyControl === true) return true
if (typeof document !== 'undefined') return document.cookie.includes('ccpa_opt_out=1')
return false
}
export function initializeThirdPartyPixels() {
if (isOptedOut()) return
loadFacebookPixel()
loadGoogleAdsRemarketing()
}
Add to your privacy policy: "We honor the Global Privacy Control (GPC) signal. A GPC-enabled browser is automatically treated as an opt-out of sale or sharing." This disclosure is required by CPRA regulations.
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 CCPA/CPRA Readiness Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- ccpa · §1798.120 — Right to opt out — businesses must honor opt-out signals including GPC
- external · GPC-Spec-1.0 — Global Privacy Control specification — W3C Community Group
- eprivacy · Art. 5(3) — Browser-level consent signals for tracking
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ccpa-readiness·automated