GDPR vs CCPA rules
This page walks through a common setup: an opt-in banner for Europe (GDPR) and an opt-out banner for California (CCPA), with a default banner for everyone else.
The big picture
GDPR (Europe). Asks visitors to opt in. Non-essential cookies don't run until the visitor clicks Accept All. Reject All must be just as easy to find.
CCPA / CPRA (California). Lets visitors opt out. Cookies can run by default, but visitors must have a clear "Do Not Sell or Share" option.
Default. A general-purpose banner for visitors elsewhere.
Set up your three banners
Before creating geo rules, set up the banners you'll target. In Banner Configuration → Customization, create three banners with the right types. See Creating banners and banner types.
EU banner. A GDPR banner with Accept All, Reject All, and Manage Settings buttons. All categories off by default. Stricter wording.
California banner. A Do Not Sell banner with the Do Not Sell button visible. Lighter wording.
Default banner. A Standard banner with Accept All and Manage Settings visible. Friendly wording.
(Each banner can have its own colors, languages, and content. See Banner customization overview.)
Create the geo rules
Open Geo targeting and add three rules.
Rule 1: Europe (GDPR)
Name: Europe (GDPR).
Locations: EEA, UK, CH. The EEA code already covers every EU member state plus Norway, Iceland, and Liechtenstein; the UK and Switzerland need their own codes.
Banner: EU banner.
Defaults: Functional off, Performance off, Targeting off. Visitors must opt in.
Rule 2: California (CCPA)
Name: California (CCPA).
Locations: California (US-CA).
Banner: California banner.
Defaults: Functional on, Performance on, Targeting on. Visitors can opt out via the banner or the Do Not Sell button.
Rule 3: Default
Name: Default.
Locations: None (this is the catch-all).
Banner: Default banner, or No banner if you do not want to show anything outside the regions above. With No banner every category is granted for these visitors and Google tags measure normally.
Defaults: Up to you, but most teams keep things on by default with a clear way to opt out.
Mark this rule as the default so it's used for everyone else.
Test each rule
Open Scripts, switch to the Test tab, and use the Location dropdown to pick each region.
Test the EU rule by picking, for example, Germany.
Test the California rule by picking US-CA.
Test the default by picking somewhere not covered by another rule.
Each preview should show the matching banner with the correct categories on or off.