Skip to main content

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. 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 customization create three banners (or duplicate one and adjust each).

EU banner. Accept All, Reject All, and Manage Settings buttons. All categories off by default. Stricter wording.

California banner. Accept All visible. Reject All visible. The Do Not Sell button visible. Lighter wording.

Default banner. 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: All EU member states plus the UK, Switzerland, Norway, and Iceland.

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.

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.

What's next

Banner customization overview.

Auto-detect location.

GDPR guide.

CCPA / CPRA guide.