Global privacy control

From mukul975/Privacy-Data-Protection-Skills · View interactive version

Global privacy control is an AI agent skill from the GitHub repository mukul975/Privacy-Data-Protection-Skills. Implementation guide for Global Privacy Control (GPC) automated opt-out signal per CPRA Section 1798.135(e). Covers Sec-GPC HTTP header detection, JavaScript navigator.globalPrivacyControl API, and state-specific requirements for CA, CO, CT, MT, TX, and OR. Includes server-side detection code and co

How to use this skill

Skill file

Implementing Global Privacy Control (GPC)

Overview

Global Privacy Control (GPC) is a browser-level signal that communicates a user's privacy preference to opt out of the sale or sharing of their personal information. The GPC specification defines both an HTTP header (Sec-GPC: 1) and a JavaScript API (navigator.globalPrivacyControl) for transmitting this signal.

Under California Privacy Rights Act (CPRA) Section 1798.135(e), businesses must treat GPC signals as valid opt-out requests. The California Attorney General confirmed this enforcement position in the Sephora settlement (August 2022, $1.2 million fine), which was the first enforcement action involving GPC signals.

Legal Requirements by State

California — CPRA (effective January 1, 2023)

Colorado — Colorado Privacy Act (CPA, effective July 1, 2024)

Connecticut — Connecticut Data Privacy Act (CTDPA, effective July 1, 2023)

Montana — Montana Consumer Data Privacy Act (effective October 1, 2024)

Texas — Texas Data Privacy and Security Act (TDPSA, effective July 1, 2024)

Oregon — Oregon Consumer Privacy Act (effective July 1, 2024)

GPC Technical Specification

HTTP Header Detection

The GPC signal is transmitted as an HTTP request header:

Sec-GPC: 1

This header is set by the browser (or browser extension) on every HTTP request when the user has enabled GPC. The header is absent (not set to 0) when GPC is not enabled.

JavaScript API Detection

The GPC signal is also available via the JavaScript DOM API:

// Check if GPC is supported and enabled
if (navigator.globalPrivacyControl === true) {
    // User has opted out — do not sell/share personal information
    // Do not load non-essential tracking scripts
    // Set internal opt-out flag for this user
}

Key considerations:

Server-Side Detection (HTTP Header)

On the server side, check for the Sec-GPC header in incoming requests:

If Sec-GPC header is present AND equals "1":
    → Set opt-out flag for this session/user
    → Do not initiate sale or sharing of personal information
    → Do not load third-party tracking pixels
    → Log GPC signal receipt for compliance records

Implementation Architecture at CloudVault SaaS Inc.

Client-Side Detection

CloudVault SaaS Inc. checks GPC at two points:

  1. Page Load: Before initializing any analytics or advertising SDKs, check navigator.globalPrivacyControl. If true, suppress non-essential tracking.
  1. Consent Banner Interaction: If GPC is detected, pre-select the "Opt Out of Sale/Sharing" option in the cookie consent banner and display a notice: "We detected your Global Privacy Control signal. Your opt-out preference has been applied."

Server-Side Processing

The CloudVault SaaS Inc. backend middleware:

  1. Inspects every incoming HTTP request for the Sec-GPC: 1 header.
  2. If detected, sets a session-level flag gpc_opt_out = true.
  3. If the request is associated with an authenticated user, propagates the opt-out to the user's consent record for applicable purposes (sale/sharing).
  4. Returns a Sec-GPC response header echoing the signal (transparency).
  5. Logs the GPC signal receipt with timestamp, user agent, and associated user ID (if authenticated).

Mapping GPC to Internal Consent System

GPC is a binary signal (opt out of sale/sharing). CloudVault SaaS Inc. maps it to specific consent purposes:

| GPC Signal | Internal Purpose | Action |

|-----------|-----------------|--------|

| Sec-GPC: 1 | pur_benchmarking_003 (Third-party data sharing) | Withdraw consent / opt out |

| Sec-GPC: 1 | pur_advertising_004 (Targeted advertising) | Withdraw consent / opt out |

| Sec-GPC: 1 | pur_analytics_001 (Service improvement) | No change (internal use, not sale/sharing) |

| Sec-GPC: 1 | pur_marketing_002 (Product emails) | No change (direct marketing, not sale/sharing) |

Conflict Resolution

When a user has manually opted in via the preference center but their browser sends GPC:

Compliance Verification

To verify GPC implementation:

  1. Install a GPC-enabled browser or extension (Firefox with Enhanced Tracking Protection, DuckDuckGo browser, Brave browser, or the OptMeowt extension for Chrome)
  2. Navigate to CloudVault SaaS Inc. application
  3. Verify that Sec-GPC: 1 header is sent in network requests
  4. Confirm that tracking scripts are not loaded
  5. Confirm that the consent banner reflects the opt-out preference
  6. Verify server-side logs record the GPC signal
  7. Confirm that authenticated users have their consent record updated

Key Regulatory References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.