/cookie-consent-skills:gpc-cookie-integrationfrom cookie-consent-skills
Integrates Global Privacy Control (GPC) signals with cookie consent platforms. Covers GPC detection via HTTP header and JS API, automatic opt-out, and mapping to US state privacy laws (CCPA, CPA, CTDPA).
Ships in cookie-consent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Global Privacy Control (GPC) is a browser-level signal that communicates a user's privacy preferences to websites. Specified by the GPC community group and recognized as a legally binding opt-out mechanism under California's CCPA/CPRA (effective January 1, 2023), Colorado's CPA (effective July 1, 2024), Connecticut's CTDPA (effective July 1, 2023), and other US state privacy laws, GPC transmits a Sec-GPC: 1 HTTP header and a navigator.globalPrivacyControl JavaScript property with each request. Websites must detect this signal and automatically trigger opt-out of sale, sharing, and targeted advertising without requiring additional user action. Integration with cookie consent management platforms (CMPs) is essential to ensure the GPC signal correctly suppresses advertising cookies and data sharing.
HTTP Header:
Sec-GPC: 1
Present on every HTTP request when the user has enabled GPC in their browser or browser extension.
JavaScript API:
navigator.globalPrivacyControl // Returns true if GPC is enabled
GPC-Enabled Browsers and Extensions:
| Browser/Extension | GPC Support | How to Enable |
|---|---|---|
| Firefox | Built-in (v120+) | Settings > Privacy & Security > "Tell websites not to sell or share my data" |
| Brave | Built-in (default ON) | Enabled by default; disable in Settings > Shields |
| DuckDuckGo Browser | Built-in (default ON) | Enabled by default on mobile and desktop |
| DuckDuckGo Extension | Extension | Install extension; GPC enabled by default |
| Privacy Badger (EFF) | Extension | Install extension; GPC enabled by default |
| OptMeowt | Extension | Chrome/Firefox extension specifically for GPC |
| Safari | Not natively supported | Requires third-party extension |
| Chrome | Not natively supported | Requires extension (DuckDuckGo, Privacy Badger) |
| Feature | GPC | DNT |
|---|---|---|
| HTTP header | Sec-GPC: 1 | DNT: 1 |
| JavaScript API | navigator.globalPrivacyControl | navigator.doNotTrack |
| Legal recognition | Yes — CCPA/CPRA, CPA, CTDPA, other state laws | No legal enforcement mechanism |
| Scope | Opt-out of sale, sharing, targeted advertising | General tracking preference |
| Browser adoption | Growing (Firefox, Brave, DuckDuckGo) | Deprecated by most browsers |
| Industry compliance | Legally required in applicable jurisdictions | Largely ignored |
| State | Law | GPC Status | Effective Date | Requirement |
|---|---|---|---|---|
| California | CCPA/CPRA | Legally binding opt-out | Jan 1, 2023 | Must treat GPC as valid opt-out of sale and sharing (Cal. Civ. Code §1798.135(e); 11 CCR §7025(b)) |
| Colorado | CPA | Legally binding opt-out | Jul 1, 2024 | Must honor "universal opt-out mechanism" including GPC (C.R.S. §6-1-1313(1)(a); 4 CCR 904-3 Rule 5.11) |
| Connecticut | CTDPA | Legally binding opt-out | Jul 1, 2023 (UOM: Jan 1, 2025) | Must honor "opt-out preference signal" (P.A. 22-15, §6(a)(6)) |
| Montana | MCDPA | Legally binding opt-out | Oct 1, 2024 | Must honor universal opt-out mechanism |
| Texas | TDPSA | Legally binding opt-out | Jul 1, 2024 (UOM: Jan 1, 2025) | Must honor universal opt-out mechanism |
| Oregon | OCPA | Legally binding opt-out | Jul 1, 2024 (UOM: Jan 1, 2026) | Must honor universal opt-out mechanism |
| Delaware | DPDPA | Legally binding opt-out | Jan 1, 2025 (UOM: Jan 1, 2026) | Must honor universal opt-out mechanism |
| New Hampshire | NHPA | Legally binding opt-out | Jan 1, 2025 | Must honor universal opt-out mechanism |
| New Jersey | NJDPA | Legally binding opt-out | Jan 15, 2025 (UOM: Jul 15, 2025) | Must honor universal opt-out mechanism |
| Virginia | VCDPA | Voluntary (no UOM mandate) | Jan 1, 2023 | No explicit UOM requirement, but opt-out of targeted advertising required |
| Utah | UCPA | Voluntary (no UOM mandate) | Dec 31, 2023 | No UOM requirement |
When GPC is detected for a user in an applicable jurisdiction:
| Processing Activity | GPC Impact | Action Required |
|---|---|---|
| Sale of personal information | Opt-out triggered | Stop selling PI for this user |
| Sharing for cross-context behavioral advertising | Opt-out triggered | Stop sharing PI with ad partners |
| Targeted advertising | Opt-out triggered (CPA, CTDPA, TDPSA) | Disable behavioral targeting |
| Profiling for automated decisions | Opt-out triggered (some states) | Disable profiling |
| Analytics (first-party) | Not triggered | GPC does not opt out of first-party analytics |
| Essential cookies | Not triggered | Strictly necessary cookies unaffected |
Page Load
│
├── Check for GPC signal
│ ├── navigator.globalPrivacyControl === true
│ │ OR
│ └── Server detects Sec-GPC: 1 header
│
├── Determine user jurisdiction
│ ├── IP geolocation → US state mapping
│ └── Check if state has GPC legal requirement
│
├── If GPC detected AND applicable jurisdiction:
│ ├── Automatically set consent state:
│ │ ├── ad_storage: denied
│ │ ├── ad_user_data: denied
│ │ ├── ad_personalization: denied
│ │ ├── analytics_storage: [per CMP default — GPC does not cover]
│ │ └── sale_of_data: opted_out
│ │
│ ├── Block advertising cookies and tags
│ ├── Do NOT fire: Meta Pixel, Google Ads remarketing, third-party ad tags
│ ├── DO fire: GA4 (if analytics consent separate from GPC)
│ │
│ ├── Display modified banner (optional):
│ │ "We detected your Global Privacy Control preference.
│ │ We will not sell or share your personal information.
│ │ [Manage Other Preferences]"
│ │
│ └── Record GPC opt-out in consent log
│
└── If GPC detected but NON-applicable jurisdiction (e.g., EU):
└── Treat as privacy signal but apply jurisdiction's own rules
(EU still requires opt-in consent regardless of GPC)
Server-Side GPC Detection (Node.js middleware):
function detectGPC(req, res, next) {
const gpcHeader = req.headers['sec-gpc'];
const gpcEnabled = gpcHeader === '1';
req.gpcSignal = gpcEnabled;
if (gpcEnabled) {
// Determine jurisdiction from IP
const userState = geolocateToState(req.ip);
// States where GPC is legally binding
const gpcMandatoryStates = ['CA', 'CO', 'CT', 'MT', 'TX', 'OR', 'DE', 'NH', 'NJ'];
req.gpcLegallyBinding = gpcMandatoryStates.includes(userState);
req.gpcOptOut = {
sale: gpcEnabled && req.gpcLegallyBinding,
sharing: gpcEnabled && req.gpcLegallyBinding,
targetedAdvertising: gpcEnabled && req.gpcLegallyBinding,
};
}
next();
}
Client-Side GPC Detection and CMP Update:
function handleGPCSignal() {
const gpcEnabled = navigator.globalPrivacyControl === true;
if (!gpcEnabled) return;
// Get user's jurisdiction (from server or geolocation)
const userJurisdiction = getUserJurisdiction();
const gpcBindingStates = ['CA', 'CO', 'CT', 'MT', 'TX', 'OR', 'DE', 'NH', 'NJ'];
if (gpcBindingStates.includes(userJurisdiction)) {
// Update Google Consent Mode
gtag('consent', 'update', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
// analytics_storage not affected by GPC
});
// Update CMP state
updateCMPState({
sale_optout: true,
sharing_optout: true,
targeted_advertising_optout: true,
source: 'gpc_signal',
});
// Remove any existing advertising cookies
removeAdvertisingCookies();
// Log GPC opt-out
logConsentEvent({
type: 'gpc_auto_optout',
jurisdiction: userJurisdiction,
timestamp: new Date().toISOString(),
gpc_header_present: true,
});
}
}
function removeAdvertisingCookies() {
const adCookies = ['_fbp', '_fbc', '_gcl_au', 'IDE', 'fr', 'NID'];
adCookies.forEach(name => {
document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=.pinnacle-ecommerce.com`;
});
}
// Run on page load
handleGPCSignal();
OneTrust GPC Configuration:
| Setting | Value |
|---|---|
| Honor GPC Signal | Enabled |
| GPC Treatment | Apply to "Sale of Personal Data" and "Targeted Advertising" categories |
| GPC Applicable Regions | US-CA, US-CO, US-CT, US-MT, US-TX, US-OR, US-DE, US-NH, US-NJ |
| GPC Banner Behavior | Suppress opt-out banner (already opted out); show confirmation notice |
| GPC Consent Record | Log GPC signal as opt-out source |
Cookiebot GPC Configuration:
| Setting | Value |
|---|---|
| Respect GPC | Enabled |
| GPC → Category Mapping | GPC = reject "Marketing" category |
| GPC Regions | California, Colorado, Connecticut, Montana, Texas, Oregon, Delaware, New Hampshire, New Jersey |
| Test | Expected Behavior | Verification Method |
|---|---|---|
| GPC header sent | Browser sends Sec-GPC: 1 | Network inspector |
| Server detects GPC | Middleware sets req.gpcSignal = true | Server logs |
| Ad cookies blocked | No _fbp, _gcl_au, IDE cookies set | Cookie inspector |
| Ad tags blocked | No Meta Pixel, Google Ads remarketing requests | Network inspector |
| Analytics unaffected | GA4 still fires (GPC does not cover analytics) | GA4 real-time reports |
| Consent log records GPC | GPC opt-out logged with timestamp and jurisdiction | Database query |
| CCPA opt-out link reflects GPC | "Do Not Sell" page shows GPC-detected opt-out status | UI inspection |
| Modified banner displayed | Banner acknowledges GPC preference | Visual verification |
Under California Attorney General regulations (11 CCR §7025):
Pinnacle E-Commerce Ltd Privacy Policy Language:
"We recognize the Global Privacy Control (GPC) signal sent by your browser. When we detect a GPC signal from a user in California, we treat it as a request to opt out of the sale and sharing of personal information as defined under the California Consumer Privacy Act (CCPA) and California Privacy Rights Act (CPRA). We apply this opt-out automatically without requiring any additional action from you."
| Scenario | Resolution |
|---|---|
| User has GPC enabled but previously opted IN to sharing | GPC overrides — treat as opt-out (most recent signal governs) |
| User has GPC enabled and is in non-applicable state (e.g., Utah) | Respect GPC as privacy preference but not legally required |
| User has GPC enabled and is in EU | GPC does not substitute for opt-in consent; apply EU rules |
| GPC detected on API request (no browser) | Honor if Sec-GPC header present (may be from privacy-aware app) |
| GPC enabled for some pages, disabled for others | Per-request evaluation; this should not normally occur |
| Multiple opt-out signals (GPC + cookie banner reject) | Apply most restrictive — both result in opt-out |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
gpc, global-privacy-control, cookie-consent, ccpa, privacy-compliance, opt-out
npx claudepluginhub mukul975/privacy-data-protection-skills --plugin cookie-consent-skills12 skills in this plugin
/analytics-cookie-consentManaging consent for analytics cookies and implementing privacy-preserving measurement. Covers GA4 privacy configuration, consent mode fallback behavior, aggregate reporting alternatives, and cookieless measurement approaches./cnil-cookie-bannerDesigning and implementing CNIL-compliant cookie consent banners for French and EU audiences. References the EUR 100M Google LLC fine and EUR 150M Meta Platforms fine for non-compliant cookie practices. Covers equal prominence, reject-all buttons, cookie walls prohibition, and 6-month reconsent cycles./cookie-auditComprehensive methodology for auditing website cookies and tracking technologies. Covers automated scanning, cookie categorization, lifecycle documentation, and compliance gap analysis referencing the Planet49 CJEU ruling (C-673/17)./cookie-consent-testingAutomated cookie consent validation using Selenium and Playwright. Covers banner interaction testing, consent state verification, tag firing audit after consent choices, regression testing for cookie compliance, and CI/CD pipeline integration./cookieless-alternativesEvaluating and implementing cookie-less tracking alternatives for a post-cookie era. Covers the Privacy Sandbox APIs (Topics, Attribution Reporting, Protected Audiences), server-side analytics, and privacy-preserving measurement techniques./cookie-lifetime-auditAuditing cookie lifetimes against regulatory recommendations and browser policies. Covers CNIL 13-month maximum recommendation, session vs persistent classification, third-party cookie phase-out impact, and Safari ITP duration caps.2 plugins in one repository ship this exact skill · first indexed Jul 7, 2026
Other plugins' skills for the same job