US privacy laws
Opt-in vs opt-out consent: GDPR vs CCPA
Under the GDPR and ePrivacy rules, non-essential tracking waits for a yes. Under the CCPA and other US state laws, it can run until the visitor says no. A regional banner can apply the right model to each visitor.
- Plain English
- Written for website owners
- Free to read
On this page
Opt-in consent means you ask first: non-essential cookies and tracking don't start until the visitor actively agrees. That's the model under the GDPR and the EU ePrivacy Directive, and in the UK. Opt-out means you can start by default but must let people stop: tracking runs until the visitor opts out or their browser sends an opt-out signal. That's the model under California's CCPA and the other US state privacy laws. If your site has visitors from both places, you don't need to pick one. A regional banner can ask European visitors first and give US visitors an opt-out, using the same categories and the same preferences panel.
The two models in plain terms
Opt-in (EU, EEA, UK and others). ePrivacy Directive Art. 5(3) requires consent before storing or reading non-essential information on a device. The GDPR defines that consent as "freely given, specific, informed and unambiguous", given by a statement or clear affirmative action (Art. 4(11)). It must also be as easy to withdraw as to give (Art. 7(3)), and you must be able to prove it (Art. 7(1)). Silence, pre-ticked boxes and continued browsing don't count.
Opt-out (California and other US states). The CCPA gives consumers the right to direct a business not to sell or share their personal information (Cal. Civ. Code §1798.120), and requires a clear way to do so (§1798.135). Other state laws add the right to opt out of targeted advertising and certain profiling. The business doesn't need permission first, but the opt-out must be easy, must work, and must be triggered automatically by signals such as Global Privacy Control.
Neither model is pure. The GDPR has opt-out elements: processing based on legitimate interests is subject to a right to object (Art. 21), and many countries allow existing customers to be emailed until they unsubscribe. US laws have opt-in pockets: the CCPA requires opt-in consent to sell or share data of consumers under 16, and most other state laws require opt-in consent for sensitive data.
GDPR vs CCPA side by side
| Question | GDPR and ePrivacy (opt-in) | CCPA/CPRA (opt-out) |
|---|---|---|
| Can analytics and ad tags run on first load? | No, only strictly necessary ones | Yes, unless an opt-out or signal is already present |
| What triggers the rule? | Storing or reading non-essential information on the device | Selling or sharing personal information (sharing means cross-context behavioral advertising) |
| What does the visitor do? | Actively agrees, per category | Opts out, by link, preferences panel or browser signal |
| Pre-ticked boxes or "by browsing you agree" | Not valid consent | Not relevant for the opt-out, but dark patterns invalidate any consent you do ask for (§1798.140(h)) |
| How easy must refusing be? | As easy as accepting; regulators expect Reject all on the first layer | Symmetrical choices (regulations §7004); opting out can't take more steps than opting in |
| Browser signals | No formal legal status for GPC | GPC must be treated as a valid opt-out (regulations §7025) |
| Children | Parental consent for under-16s for online services relying on consent; countries can lower it to 13 (Art. 8) | Opt-in for under-16s to sell or share; parent's consent for under-13s (§1798.120(c)) |
| Asking again | Refresh consent at reasonable intervals and when purposes change | Wait at least 12 months before asking someone who opted out to opt back in (§1798.135(c)(4)) |
| Proof | Must be able to show consent was given (Art. 7(1)) | Keep records of consumer requests for 24 months (regulations §7101) |
| Who enforces | National data protection authorities | California Attorney General and the California Privacy Protection Agency |
For the full list in each regime, see our GDPR cookie consent checklist and our CCPA website compliance checklist.
What each model means for your scripts
The legal difference becomes an engineering difference in one place: the default state of each category before the visitor has done anything.
// Simplified: defaults before the visitor makes a choice
function defaultsFor(mode, gpc) {
if (mode === 'opt-in') {
return { analytics: false, functional: false, marketing: false };
}
if (mode === 'opt-out') {
// runs by default, but GPC is an automatic opt-out of sale/sharing
return { analytics: true, functional: true, marketing: !gpc };
}
return { analytics: true, functional: true, marketing: true }; // notice only
}
In both models, every non-essential script needs to be controllable. In opt-in mode, the scripts start blocked and are released after consent. In opt-out mode, they start allowed but must be stoppable at any moment: when the visitor clicks "Do Not Sell or Share", when GPC is present, or when an earlier opt-out is stored. A site that can't block a tag can't honor either model.
The categories also need to line up with the law. In opt-out mode, everything that sells or shares data for advertising must sit in the category the opt-out switches off, usually "marketing". If a retargeting pixel is filed under "functional", the opt-out won't touch it.
Other models you'll meet
Many countries don't fit neatly into either box:
- Notice only. Some countries have no cookie consent rule, but transparency is still expected. A notice that links to your policy is common.
- Implied consent. Canada's federal law (PIPEDA) allows implied consent for some less sensitive uses, with clear notice and an easy way to refuse. Quebec's Law 25 is stricter and expects tracking technologies to be off by default.
- Consent-based regimes outside Europe. Brazil's LGPD guidance on cookies, for example, points toward consent for non-essential cookies.
Our cookie consent rules by country table compares the main jurisdictions.
How one banner can do both
A regional banner decides the mode per visitor, usually from the country of their IP address, and keeps everything else the same:
- Same categories everywhere. Necessary, analytics, functional and marketing mean the same thing in every region. Only the defaults change.
- Different first layer. Opt-in visitors see Reject all, Preferences and Accept all. Opt-out visitors see "Do Not Sell or Share My Personal Information", Preferences and Accept.
- Same preferences panel. Visitors anywhere can open it later to change their choices.
- Strictest for unknowns. If the location can't be determined, use opt-in.
- Record the mode. Log which mode and banner version applied with each choice, so you can show what the visitor saw.
Country-level detection is reliable enough for this. State-level detection within the US is less precise, which is one reason many businesses apply opt-out mode to all US visitors rather than only to residents of states with privacy laws. VPNs and travelers will sometimes land in the "wrong" region. Defaulting unknowns to the stricter mode keeps that risk small.
This is how PrivacyQuick's regional rules work: by default, opt-in for the EU, EEA, UK and Switzerland (and for Canada and Brazil), opt-out with GPC honored for the US, a notice elsewhere, and the strictest mode when the country is unknown. You can change the mode for any region. The free plan uses opt-in for everyone.
Opt-in and opt-out differ in their starting point, not in the work involved. Both require you to tag every non-essential script, offer a real choice, respect it technically and keep a record. Get that foundation right, and switching the default by region is a configuration setting.
Mistakes to avoid
- Using opt-out for European visitors. Running analytics or ad tags before consent is the most common cause of cookie enforcement in Europe.
- An "opt-in" banner that doesn't block anything. Showing Accept and Reject while tags load anyway is misleading in any jurisdiction.
- Forgetting GPC in opt-out mode. In California and several other states, the browser signal is as binding as a click. See our GPC guide.
- Asymmetric choices. Both regimes object to designs that make "yes" easier than "no".
- Assuming US visitors need nothing. Opt-out still requires a working mechanism if a state law applies. See do US websites need a cookie banner?
For a full side-by-side of the two laws, see GDPR vs CCPA: key differences for websites.
Next steps
- Look at where your visitors come from, and decide which regions need opt-in and which opt-out.
- Run a free cookie scan and sort every tag into necessary, analytics, functional or marketing.
- Make every analytics and marketing tag blockable. See the script blocking docs for one approach.
- Set opt-in as the fallback for unknown locations.
- Test both modes: from a European connection, confirm nothing loads before consent. From a US one with GPC on, confirm marketing tags never fire.
Frequently asked questions
Is the CCPA opt-in or opt-out?
Mostly opt-out: businesses can sell or share personal information until a consumer opts out. The exceptions are consumers under 16, whose data needs opt-in consent before it is sold or shared, and asking an opted-out consumer to opt back in.
Can I use an opt-out cookie banner for EU visitors?
No. Non-essential cookies need prior consent under the ePrivacy Directive, so for visitors in the EU, EEA and UK, analytics and marketing tags must wait until the visitor actively agrees.
What happens if I can't tell where a visitor is?
Apply the stricter model. Treating unknown locations as opt-in means you never run tracking for someone who should have been asked first.
Is implied consent the same as opt-out?
Not quite. Implied consent, used in some countries such as Canada for less sensitive uses, assumes agreement from the context and still expects clear notice and an easy way to refuse. Opt-out, in the US sense, is a legal right to stop specific uses such as sale and targeted advertising.
Check your own website in 30 seconds
Our free scanner lists every cookie and tracker your site sets, sorted into categories, before you add a banner.
This guide is general information, not legal advice. Laws and regulator guidance change; check the current rules for your situation or ask a lawyer.