Sub topic 9
Honoring Global Privacy Control and other opt-out preference signals
This chapter assumes you know what "sale" and "sharing" mean under the CCPA/CPRA, and that you have seen the "Do Not Sell or Share My Personal Information" link. Here you will learn how to treat a browser signal as an opt-out request, where that rule comes from, and where implementations usually fail.
What an opt-out preference signal is
An opt-out preference signal is a message sent automatically by a browser, extension, or device. It says the user wants to opt out of the sale and sharing of their personal information. The user sets it once and it applies to every site they visit. They don't have to find a link on each one.
The CCPA regulations require a business that sells or shares personal information to process these signals as valid opt-out requests. Global Privacy Control (GPC) is the signal in common use. Browsers such as Firefox and Brave support it natively, and many privacy extensions add it to other browsers.
GPC reaches your site in two ways:
- HTTP request header:
Sec-GPC: 1is sent with every request. - JavaScript property:
navigator.globalPrivacyControlistrue.
A user who has not turned GPC on sends neither. The header is never sent as 0, so treat anything other than 1 as "no signal."
What the signal means legally
The regulations (Cal. Code Regs. tit. 11, § 7025) set out the main rules.
- It is an opt-out of sale and sharing. You must treat the signal as a request to opt out of sale and sharing for that browser or device. This includes any pseudonymous profile tied to it, such as a cookie ID or device ID.
- Apply it to the known consumer too. If you can tie the browser to a known person, for example because they are logged in, you must also apply the opt-out to that person's account. Your email list and CRM are part of this.
- Don't ask for verification. A signal is not a request to know or delete. You can't make the user prove who they are or fill in a form before you honor it.
- Don't add friction. You can't make the consumer give extra information before the signal takes effect.
- Keep it from becoming a dark pattern. You can show the user that the signal was processed, for example with a message such as "Opt-Out Preference Signal Honored." This is optional but helpful.
If the signal conflicts with a setting the user chose on your site, you may ask them about the conflict. A common case is a consent setting that allows sale or sharing. Until they answer, you must keep honoring the signal. If the conflict involves a financial incentive such as a loyalty program, you may notify the user that honoring the signal could end their participation. You still can't ignore the signal while you wait.
The signal does not do everything. It covers sale and sharing. It is not, by itself, a request to delete data, and it does not automatically limit use of sensitive personal information. You may choose to treat it more broadly, which is often simpler to build.
The flow of a signal
The point is that the signal triggers three separate actions: tags stop, the profile is flagged, and a known account is suppressed. Many implementations do only the first.
Implementing it
Client side
A browser-side check is the quickest way to stop tags from loading:
// Client side: check the browser's Global Privacy Control setting
function loadAdTags() {
const script = document.createElement('script');
script.src = 'https://ads.example.com/tag.js'; // placeholder vendor URL
script.async = true;
document.head.appendChild(script);
}
if (navigator.globalPrivacyControl === true) {
// Do not load advertising tags that sell or share personal information
console.log('GPC detected: skipping ad and cross-context tracking tags');
} else {
loadAdTags();
}This only works if the check runs before any tag fires. If a tag manager container already loads the ad pixels on page view, your check comes too late. Put the GPC condition inside the tag manager as a trigger exception, or load the manager itself only after the check.
Server side
The header is more reliable. It is present on the first request, so the server can leave the tags out of the HTML entirely:
const express = require('express');
const app = express();
app.set('view engine', 'ejs'); // any template engine works; 'home' is your template
// Server side (Express): treat the Sec-GPC header as an opt-out request
function gpcMiddleware(req, res, next) {
req.privacyOptOut = req.get('Sec-GPC') === '1';
next();
}
app.use(gpcMiddleware);
app.get('/', (req, res) => {
res.render('home', { loadAdTags: !req.privacyOptOut });
});
app.listen(3000);A server-side check also lets you act on the signal beyond the page. You can write the opt-out to the visitor's profile and skip server-to-server events, such as conversion API calls, that would send their data to an ad platform.
Downstream systems
If the visitor is known, the opt-out has to reach your audience building. This function removes opted-out people before an upload to an ad platform:
def build_audience(contacts, opted_out_ids):
"""Return contacts that may be included in an ad audience upload."""
suppressed = set(opted_out_ids)
return [c for c in contacts if c["id"] not in suppressed]
contacts = [{"id": 1, "email": "[email protected]"}, {"id": 2, "email": "[email protected]"}]
print(build_audience(contacts, opted_out_ids=[2]))For this to work, the GPC event must write the person's ID to the same suppression list that the audience job reads. Otherwise a visitor can send GPC today and still be uploaded to a retargeting audience tomorrow.
Common failure points
| Failure | Why it happens | Fix |
|---|---|---|
| Tags fire before the check | Tag manager loads pixels on page view | Gate the tags on GPC inside the manager, or check before loading it |
| Only the banner is checked | Cookie banner ignores the signal | Read the signal separately from banner choices |
| Signal applies for one visit only | Opt-out is not stored | Save it to the device profile and the account |
| Logged-in user still in audiences | Suppression list not updated | Write the account ID on login when GPC is present |
| Server events still sent | Server-side conversion calls skip the check | Pass the opt-out flag into the event pipeline |
| Vendors keep receiving data | Vendor scripts loaded by other scripts | Audit with a browser that has GPC on and read the network log |
You can test the first row yourself. Turn on GPC in Firefox or Brave, open your site with developer tools, and watch the Network tab. Requests to ad domains should not appear.
Other states and the wider picture
California was early, but not alone. Several other state privacy laws require businesses to recognize a universal opt-out mechanism. Colorado's requirement took effect in 2024, and Connecticut, Texas, Montana, and others followed, with dates varying by state. The covered purposes differ. In many states the signal covers targeted advertising and sale, and some states also require it to be treated as an opt-out of profiling. Check the specifics for each state where you have users. A GPC implementation built to the California standard is a good base for all of them, but confirm what each state counts as the covered opt-out.
California has also moved to make the signal easier to send. Recent legislation directs browser makers to offer a built-in opt-out preference setting in future years. Expect the share of visitors who send GPC to grow, so a design that works only on the edge cases will not hold.
Design decisions to settle early
- Scope of the opt-out. Decide whether GPC only blocks sale and sharing or also limits sensitive data use. Treating it broadly costs less than two code paths.
- Where the signal is stored. Keep it in a first-party cookie or local storage for anonymous visitors, and in the account record for known people.
- Which vendors are in scope. Review each tag by contract role. A service provider may still receive data under restrictions, while a third-party ad pixel must be stopped.
- How you prove it works. Log the event with a timestamp when you honor a signal. Regulators may ask for records, and your own team will want them when something breaks.
Exercise
A visitor with GPC enabled logs in to your store. Your site skips the ad pixel on that page, but your nightly job still uploads all customers who purchased in the last 30 days to an ad platform for lookalike audiences. List two things that are wrong and one fix.
Show answer
First, the opt-out was not applied to the known consumer. The regulations require that a signal be applied to the account when the browser is linked to a known person. Second, the nightly job does not read a suppression list, so it can share the person's data and breaks the opt-out of sharing. The fix is to write the account ID to the suppression list when GPC is detected at login, and to have the audience job filter out those IDs before every upload, as in build_audience.
Exercise
Your tag manager loads an ad pixel on every page view. A developer adds a check for navigator.globalPrivacyControl at the bottom of the page. Will this honor the signal? Explain.
Show answer
No. The tag manager fires the pixel when the page starts loading, before the late check runs, so the data is already sent. The check must run first. Either block the pixel with a GPC trigger exception inside the tag manager, or have the server read Sec-GPC and leave the pixel out of the page.