AGENT SKILL

GPC 通用退出机制实现

universal-opt-out

美国各州隐私法下的通用退出(opt-out)机制实现。涵盖 Global Privacy Control (GPC) 信号的技术实现、各州认可要求、浏览器检测方法、已认证与未认证场景下的处理,以及合规测试。

License 许可
Apache-2.0
最近更新
2026-03-17
Stars
★ 338
Forks
68

01 前言 Front Matter

name
universal-opt-out
license
Apache-2.0
metadata
{ "tags": "universal-opt-out, gpc, global-privacy-control, opt-out-signal, browser-signal", "author": "mukul975", "domain": "privacy", "version": "1.0", "subdomain": "us-state-privacy-laws" }
description
Universal opt-out mechanism implementation across US state privacy laws. Covers Global Privacy Control (GPC) signal technical implementation, state-by-state recognition requirements, browser detection methods, authenticated vs unauthenticated handling, and compliance testing.

02 资源文件 4

03 SKILL.md 正文

Universal Opt-Out Mechanism Implementation

Overview

A universal opt-out mechanism is a browser or device-level signal that communicates a consumer's privacy preferences to websites and online services. The Global Privacy Control (GPC) is the leading universal opt-out mechanism, supported by major browsers (Firefox, Brave, DuckDuckGo) and browser extensions (Privacy Badger, Disconnect). Multiple US state privacy laws now require businesses to recognize and honor these signals.

GPC is defined in the Global Privacy Control specification (published by the GPC project), transmitted via the Sec-GPC: 1 HTTP header and the navigator.globalPrivacyControl JavaScript API.

State-by-State Requirements

State Law Signal Required Effective Date Scope
California CCPA/CPRA Yes Jan 1, 2023 Sale + Sharing
Colorado CPA Yes Jul 1, 2024 Targeted ads + Sale
Connecticut CTDPA Yes Jan 1, 2025 Targeted ads + Sale
Montana MTDPA Yes Oct 1, 2025 Targeted ads + Sale
Texas TDPSA Not required N/A N/A
Virginia VCDPA Not required N/A N/A
Oregon OCPA Not required N/A N/A
Kentucky KPPA Not required N/A N/A

GPC Technical Specification

HTTP Header

Sec-GPC: 1

The Sec-GPC header is a structured header with a bare item value of 1 (true) or absent (no preference expressed). The Sec- prefix indicates it is a fetch metadata header set by the browser, not by JavaScript.

JavaScript API

navigator.globalPrivacyControl  // boolean: true or undefined

The navigator.globalPrivacyControl property returns true if the user has enabled GPC in their browser or extension, or undefined if GPC is not active.

Detection Code

function detectGPC() {
    // Check JavaScript API
    const jsGPC = navigator.globalPrivacyControl === true;

    // The HTTP header is checked server-side
    // This function covers client-side detection only

    return {
        gpcEnabled: jsGPC,
        timestamp: new Date().toISOString(),
        userAgent: navigator.userAgent,
    };
}

Server-Side Detection (Node.js/Express example)

function checkGPCHeader(req) {
    const gpcHeader = req.headers['sec-gpc'];
    return gpcHeader === '1';
}

app.use((req, res, next) => {
    if (checkGPCHeader(req)) {
        req.gpcOptOut = true;
        // Apply opt-out before rendering page
        res.locals.suppressThirdPartyTags = true;
        res.locals.suppressCrossSiteBehavioralAds = true;
    }
    next();
});

Implementation Architecture

Layer 1: Signal Detection

HTTP Request Arrives
  │
  ├─► Server-Side Check
  │     └─ Parse Sec-GPC header from request
  │
  ├─► Client-Side Check (for SPAs)
  │     └─ Read navigator.globalPrivacyControl
  │
  └─► Combined Result
        ├─ GPC detected = true → Apply opt-out
        └─ GPC not detected → Normal processing

Layer 2: Scope Determination

State Sale Opt-Out Sharing Opt-Out Targeted Ads Opt-Out Profiling Opt-Out
California Yes Yes Implied (sharing = cross-context behavioral ads) No (separate)
Colorado Yes N/A Yes No (separate)
Connecticut Yes N/A Yes No (separate)
Montana Yes N/A Yes No (separate)

Layer 3: Consumer Identity Resolution

Authenticated Consumer (logged in):

  • Associate GPC opt-out with consumer account
  • Set persistent flag: sale_opt_out = true, targeted_ads_opt_out = true
  • Override any prior opt-in (most recent preference per CO Rule 5.13)
  • Persist across sessions and devices (account-level)

Unauthenticated Consumer (not logged in):

  • Apply opt-out to current browsing session
  • Set first-party session cookie to maintain state during session
  • Apply on each new session when GPC signal is present
  • Do not require identity verification

Layer 4: Enforcement

Upon detecting GPC signal, the system must:

  1. Suppress third-party advertising tags before page render:

    • AdReach Network pixel — BLOCKED
    • Cross-context behavioral advertising tags — BLOCKED
    • Retargeting/remarketing pixels — BLOCKED
    • Social media tracking widgets — BLOCKED
  2. Allow first-party processing:

    • First-party analytics (where data stays with controller or service provider under contract)
    • Essential functionality cookies (session, cart, security)
    • Contextual advertising (based on current page content, not behavioral profile)
  3. Update server-side systems:

    • Data sharing pipeline: suppress outbound feeds to third-party ad partners
    • CMP state: update consent management platform to reflect opt-out
    • Consumer profile: flag account (if authenticated) for persistent opt-out

Compliance Rules by State

California (CPPA Regulations §7025)

  • §7025(a): Must process opt-out preference signals as valid opt-out requests
  • §7025(b): Two-step opt-out process prohibited
  • §7025(c): Must not require consumer to verify identity
  • §7025(d): Must not display pop-up or notification questioning the signal
  • §7025(e): If consumer not identifiable, apply to browser/device
  • §7025(f): If authenticated user has different prior setting, GPC takes precedence as most recent expression
  • Scope: Sale AND sharing (cross-context behavioral advertising)

Colorado (4 CCR 904-3, Rule 5.11)

  • Rule 5.10: Must recognize universal opt-out mechanisms
  • Rule 5.11: Must not display pop-up, interstitial, or other mechanism questioning signal
  • Rule 5.12: Authenticated = account-level; unauthenticated = session-level
  • Rule 5.13: Most recently expressed preference prevails on conflict
  • Rule 5.14: AG biennial review of recognized mechanisms
  • Scope: Targeted advertising AND sale
  • Requirement: Mechanism must be affirmatively selected by consumer (not default)

Connecticut (§42-520(a)(6))

  • Must recognize universal opt-out mechanisms starting January 1, 2025
  • Same principles as Colorado: no verification, no pop-ups
  • Scope: Targeted advertising AND sale

Montana (§30-14-2808(3))

  • Must recognize universal opt-out mechanisms starting October 1, 2025
  • Same principles as Colorado and Connecticut
  • Scope: Targeted advertising AND sale

Testing Protocol

Test 1: GPC Signal Detection

  • Install GPC-enabled browser (Brave, Firefox with GPC extension)
  • Visit website
  • Verify server logs show Sec-GPC: 1 header detected
  • Verify client-side navigator.globalPrivacyControl === true

Test 2: Tag Suppression

  • With GPC enabled: verify third-party advertising tags do NOT fire
  • Without GPC: verify third-party advertising tags fire normally
  • Inspect network requests to confirm suppression

Test 3: Authenticated vs. Unauthenticated

  • Visit with GPC while logged out: verify session-level opt-out
  • Log in with GPC: verify account-level opt-out persists
  • Log in without GPC after prior GPC opt-out: verify prior opt-out persists (account-level)

Test 4: No Pop-Up or Interstitial

  • Visit with GPC: verify no pop-up asks to confirm or modify signal
  • Verify consent banner does not override or question GPC signal

Test 5: Conflict Resolution

  • Set account preference to opt-in to sale/targeted ads
  • Visit with GPC enabled
  • Verify GPC takes precedence (opt-out applied)

Liberty Commerce Inc. Implementation

Technology stack: Consent management platform (CMP) with GPC signal handler, tag management system (TMS) with server-side control, privacy operations dashboard.

Architecture:

  1. Edge proxy detects Sec-GPC: 1 header on incoming requests
  2. Request metadata includes gpc_opt_out: true flag
  3. TMS evaluates flag before injecting any tags
  4. CMP state updated for session/account
  5. Server-side data sharing pipeline checks flag before transmitting to third parties
  6. Compliance dashboard reports GPC detection rates and opt-out volume

Key Regulatory References

  • CPPA Regulations §7025 — Opt-out preference signals
  • Colorado AG Regulations 4 CCR 904-3, Rule 5 — Universal opt-out mechanism
  • Conn. Gen. Stat. §42-520(a)(6) — Universal opt-out recognition
  • MCA §30-14-2808(3) — Universal opt-out recognition
  • Global Privacy Control Specification v1.0 (globalprivacycontrol.org)
  • W3C Community Group: GPC specification
  • In re Sephora Inc. (2022) — $1.2M settlement for failure to honor GPC

04 同仓库更多 Skills

mukul975
mukul975/Privacy-Data-Protection-Skills

职场邮件监控合规

workplace-email-privacy

依据 Barbulescu 诉罗马尼亚案(欧洲人权法院大法庭)、EDPB 指引及各国劳动法,实施工作场所电子邮件与互联网监控合规。涵盖可接受使用政策、合理的隐私期待、比例原则测试以及内容监控与元数据监控的区别。关键词:邮件监控、Barbulescu、职场隐私、互联网监控、可接受使用政策、ECHR、比例原则。

人力资源专员人力资源与劳动法咨询
★ 338
mukul975
mukul975/Privacy-Data-Protection-Skills

举报人数据保护合规

whistleblower-data

依据欧盟指令 2019/1937 和 GDPR,为举报(吹哨)系统实施数据保护合规。涵盖匿名举报渠道、举报人与被指控人的身份保护、保存期限限制、访问限制以及反报复措施。涉及成员国转化立法与数据保护机构(DPA)指引。关键词:举报人、指令 2019/1937、匿名举报、身份保护、报复、保存期限、举报渠道。

隐私合规专员数据保护法合规
★ 338
mukul975
mukul975/Privacy-Data-Protection-Skills

供应商终止数据返还与删除

vendor-termination-data

依据 GDPR 第 28(3)(g) 条的供应商终止数据返还与删除流程。涵盖数据提取格式、删除证明要求、过渡规划、残留数据处理以及终止后核验。

隐私合规专员GDPR合规管理
★ 338
mukul975
mukul975/Privacy-Data-Protection-Skills

供应商隐私风险评分

vendor-risk-scoring

面向数据处理者管理的供应商隐私风险分级方法论。涵盖数据量、敏感度、传输地点、认证情况、泄露历史和控制成熟度等评分要素,通过加权风险计算进行风险分级与等级划分。

隐私合规专员供应商准入与绩效管理
★ 338
mukul975
mukul975/Privacy-Data-Protection-Skills

供应商隐私尽职调查

vendor-privacy-due-diligence

依据 GDPR 第 28(1) 条的签约前供应商隐私尽职调查。涵盖风险问卷、技术控制评估、认证审查、数据流分析以及针对处理者合作的书面充分性决策。

隐私合规专员供应商准入与绩效管理
★ 338
mukul975
mukul975/Privacy-Data-Protection-Skills

供应商隐私合规审计

vendor-privacy-audit

依据 GDPR 第 28(3)(h) 条进行现场和远程供应商审计程序。涵盖审计计划、证据收集方法、问题发现分类、整改跟踪以及用于处理者合规验证的审计报告生成。

隐私合规专员GDPR合规管理
★ 338