CPRA选择退出信号处理
cpra-opt-out-signals
实现 CPRA 第 1798.135 条选择退出偏好信号处理,涵盖全球隐私控制(GPC)的技术检测、信号自动响应、跨设备一致性,以及浏览器信号与消费者明确选择之间的关系。适用于 GPC、选择退出偏好信号、CPRA 1798.135、浏览器隐私信号、“禁止出售”查询等场景。
- License 许可
- Apache-2.0
- 最近更新
- 2026-03-17
- Stars
- ★ 338
- Forks
- 68
01 前言 Front Matter
- name
- cpra-opt-out-signals
- license
- Apache-2.0
- metadata
- { "tags": "opt-out-preference-signal, gpc, cpra, global-privacy-control, do-not-sell", "author": "mukul975", "domain": "privacy", "version": "1.0", "subdomain": "data-subject-rights" }
- description
- Implements CPRA Section 1798.135 opt-out preference signal handling, covering Global Privacy Control (GPC) technical detection, automated signal honoring, cross-device consistency, and the relationship between browser signals and explicit consumer choices. Activate for GPC, opt-out preference signal, CPRA 1798.135, browser privacy signal, Do Not Sell queries.
02 资源文件 19
- 资产文件assets/template.md3.1 KB
- 资产文件assets/templates/cwv-audit-report.md1.5 KB
- 资产文件assets/templates/gsc-performance-report.md1.4 KB
- 资产文件assets/templates/indexation-status-report.md1.1 KB
- 许可证LICENSE.txt143 B
- 参考文档references/auth-setup.md5.1 KB
- 参考文档references/dma-consent-mode-v2.md2.6 KB
- 参考文档references/ga4-data-api.md5.2 KB
- 参考文档references/indexing-api.md3.2 KB
- 参考文档references/keyword-planner-api.md2.3 KB
- 参考文档references/nlp-api.md2.3 KB
- 参考文档references/pagespeed-crux-api.md6.8 KB
- 参考文档references/rate-limits-quotas.md3.3 KB
- 参考文档references/search-console-api.md5.3 KB
- 参考文档references/standards.md2.1 KB
- 参考文档references/supplementary-apis.md2.7 KB
- 参考文档references/workflows.md3.4 KB
- 参考文档references/youtube-api.md1.6 KB
- 脚本scripts/process.py8.5 KB
03 SKILL.md 正文
Implementing CPRA Opt-Out Preference Signals
Overview
CPRA Section 1798.135 requires businesses to treat opt-out preference signals (such as Global Privacy Control / GPC) as valid consumer requests to opt out of the sale and sharing of personal information. This skill covers the technical detection of GPC signals, automated honoring workflows, cross-device consistency requirements, and the interaction between browser-level signals and explicit consumer choices.
Legal Foundation
CPRA Section 1798.135 — Methods of Limiting Sale, Sharing, and Use
-
Section 1798.135(a) — A business that sells or shares consumers' personal information shall provide a clear and conspicuous link on its homepage titled "Do Not Sell or Share My Personal Information."
-
Section 1798.135(b)(1) — A business that sells or shares personal information shall treat the consumer's use of an opt-out preference signal as a valid request to opt out under Section 1798.120.
-
Section 1798.135(b)(3) — A business that complies with subsection (b)(1) is not required to post the "Do Not Sell or Share My Personal Information" link on its homepage, provided it instead posts a link to a page describing the consumer's opt-out rights.
-
Section 1798.135(e) — A business may not interpret the absence of an opt-out preference signal as consent to sell or share personal information.
CCPA Regulations (11 CCR Section 7025)
- Section 7025(a) — A business shall process an opt-out preference signal as a valid request to opt out of sale/sharing for that browser or device, and, if known, the consumer.
- Section 7025(b) — If the business is unable to identify the consumer, the opt-out shall apply to the browser or device from which the signal was sent.
- Section 7025(c) — The business shall not require the consumer to provide additional information to opt out via a preference signal, unless necessary to verify the consumer's identity.
- Section 7025(d) — If a conflict exists between the opt-out preference signal and a consumer's business-specific privacy setting, the business shall process the opt-out preference signal but may notify the consumer of the conflict and provide the consumer the opportunity to confirm their intention.
Global Privacy Control (GPC) Specification
GPC is an HTTP header and JavaScript API signal that communicates a user's privacy preferences:
- HTTP header:
Sec-GPC: 1 - JavaScript API:
navigator.globalPrivacyControl === true - DNT header: GPC is distinct from the deprecated Do Not Track (DNT) header. GPC has legal effect under CPRA and Colorado Privacy Act; DNT does not.
Technical Implementation
Step 1: Detect the GPC Signal
Server-Side Detection
Check for the GPC HTTP header on every incoming request:
HTTP Header: Sec-GPC: 1
If the header is present and its value is 1, the user has activated GPC.
Client-Side Detection (JavaScript)
For single-page applications or client-side consent management:
if (navigator.globalPrivacyControl === true) {
// GPC signal detected — treat as opt-out of sale/sharing
}
Step 2: Map GPC Signal to Consumer
| Scenario | Action |
|---|---|
| Consumer is logged in (authenticated) | Apply opt-out to the consumer's account across all devices |
| Consumer is not logged in but has cookies | Apply opt-out to the browser/device |
| Consumer is anonymous (no identification) | Apply opt-out to the current browsing session and device |
Step 3: Automated Honoring
When a GPC signal is detected, the following actions must be executed automatically:
- Suppress third-party tracking scripts: Do not load advertising pixels, third-party analytics trackers, or cross-site tracking scripts.
- Disable advertising cookies: Do not set or read cookies used for targeted advertising or cross-context behavioral advertising.
- Exclude from data sharing: Do not include the user's data in any data-sharing arrangements with third parties for advertising or monetisation purposes.
- Exclude from sale: Do not sell the user's personal information to any third party.
- Update consent management platform: Set the user's sale/sharing preference to "opted-out" in the CMP.
Step 4: Consent Management Platform (CMP) Integration
The CMP must be configured to:
- Detect GPC on page load: Before any third-party scripts are loaded.
- Suppress consent banner sale/sharing options: If GPC is detected, automatically set the sale/sharing toggle to "opted-out" and suppress any request for consent to sell/share.
- Allow explicit re-consent: If the consumer explicitly chooses to opt back in through the business's privacy settings, this explicit choice overrides the GPC signal for that business only.
- Log the signal: Record the GPC signal detection for compliance audit purposes.
Step 5: Cross-Device Consistency
| Consumer Status | Cross-Device Behaviour |
|---|---|
| Authenticated (logged-in account) | GPC signal from one device triggers account-level opt-out across all devices |
| Unauthenticated | GPC signal applies only to the device/browser from which it was sent |
| Consumer later logs in from GPC-enabled device | Account-level opt-out is applied retroactively |
Step 6: Conflict Resolution
When a conflict exists between the GPC signal and the consumer's explicit business-specific setting:
[GPC Signal Detected: Opt-Out]
│
▼
[Does consumer have an explicit business-specific setting?]
│
├── No explicit setting ──► Honor GPC signal (opt-out)
│
├── Explicit opt-in to sale/sharing ──► [Conflict]
│ └── Honor GPC signal (opt-out applies)
│ Optionally: display notification
│ "Your browser is sending a Global Privacy Control signal.
│ We have applied this as an opt-out of sale/sharing.
│ You previously opted in to sale/sharing on this site.
│ If you wish to maintain your opt-in, please confirm
│ in your privacy settings."
│
└── Explicit opt-out ──► No conflict (both agree on opt-out)
Step 7: Documentation and Audit
- Log every GPC signal detection with timestamp, IP hash, device identifier, and authenticated status.
- Log every opt-out action taken in response to a GPC signal.
- Maintain records for 24 months per CCPA regulation requirements.
- Include GPC signal handling in quarterly privacy compliance audits.
- Test GPC detection quarterly using browsers with GPC enabled (Firefox, Brave, DuckDuckGo).
Monitoring and Testing
Monthly Verification Checklist
- [ ] GPC header detection confirmed operational (test with Sec-GPC: 1)
- [ ] JavaScript API detection confirmed operational (test with navigator.globalPrivacyControl)
- [ ] Third-party tracking scripts are suppressed when GPC is detected
- [ ] Advertising cookies are not set when GPC is detected
- [ ] CMP correctly reflects GPC opt-out status
- [ ] Cross-device consistency confirmed for authenticated users
- [ ] Conflict resolution functioning as designed
- [ ] Audit logs recording GPC detections
04 同仓库更多 Skills
职场邮件监控合规
workplace-email-privacy
依据 Barbulescu 诉罗马尼亚案(欧洲人权法院大法庭)、EDPB 指引及各国劳动法,实施工作场所电子邮件与互联网监控合规。涵盖可接受使用政策、合理的隐私期待、比例原则测试以及内容监控与元数据监控的区别。关键词:邮件监控、Barbulescu、职场隐私、互联网监控、可接受使用政策、ECHR、比例原则。
举报人数据保护合规
whistleblower-data
依据欧盟指令 2019/1937 和 GDPR,为举报(吹哨)系统实施数据保护合规。涵盖匿名举报渠道、举报人与被指控人的身份保护、保存期限限制、访问限制以及反报复措施。涉及成员国转化立法与数据保护机构(DPA)指引。关键词:举报人、指令 2019/1937、匿名举报、身份保护、报复、保存期限、举报渠道。
供应商终止数据返还与删除
vendor-termination-data
依据 GDPR 第 28(3)(g) 条的供应商终止数据返还与删除流程。涵盖数据提取格式、删除证明要求、过渡规划、残留数据处理以及终止后核验。
供应商隐私风险评分
vendor-risk-scoring
面向数据处理者管理的供应商隐私风险分级方法论。涵盖数据量、敏感度、传输地点、认证情况、泄露历史和控制成熟度等评分要素,通过加权风险计算进行风险分级与等级划分。
供应商隐私尽职调查
vendor-privacy-due-diligence
依据 GDPR 第 28(1) 条的签约前供应商隐私尽职调查。涵盖风险问卷、技术控制评估、认证审查、数据流分析以及针对处理者合作的书面充分性决策。
供应商隐私合规审计
vendor-privacy-audit
依据 GDPR 第 28(3)(h) 条进行现场和远程供应商审计程序。涵盖审计计划、证据收集方法、问题发现分类、整改跟踪以及用于处理者合规验证的审计报告生成。