All articles

Opt-in for Europe, opt-out for the US: one OneTrust setup for both

European law wants permission before tracking. US state laws want a clear way to refuse. Geolocation rules let one site do both.

Naini Anjaneyulu, 5 December 2026

A visitor in Paris and a visitor in Dallas open the same page. The Paris visitor's analytics and ad tags have to wait for a yes. The Dallas visitor's tags can run straight away, as long as there's a clear way to opt out of targeted advertising and the site respects it. Same page, opposite defaults.

Europe asks first

Cookie rules in Europe come from two laws. The ePrivacy Directive says you need consent before storing anything on a device that isn't strictly necessary. GDPR says what counts as consent: a clear action, separate for each purpose, as easy to refuse as to give, and as easy to take back later. No pre-ticked boxes, and "by continuing to browse you agree" doesn't count.

Analytics isn't strictly necessary, however harmless it feels. And regulators look at the buttons. France's CNIL fined Google €150 million and Facebook €60 million in 2021, largely because refusing cookies took more clicks than accepting them.

The US gives a way out

There's no federal privacy law in the US. California's CCPA, expanded by the CPRA, came first, and about twenty states now have laws along similar lines. They give visitors the right to opt out of their data being sold, used for targeted advertising (California calls this "sharing") or used for profiling.

On a website, that usually means a footer link called "Do Not Sell or Share My Personal Information" or "Your Privacy Choices". Ad pixels such as the Meta Pixel can count as selling or sharing even when no money changes hands, which is why they sit behind the opt-out.

How OneTrust does both

OneTrust uses geolocation rules. Each rule covers a list of countries or US states, and OneTrust picks one for each visitor based on their IP address. A default rule catches everyone else. A common setup looks like this:

RuleCoversConsent modelBefore any choice
GDPREU, EEA, UK, SwitzerlandOpt-inBanner with Accept all, Reject all and Settings. Everything except strictly necessary is off.
USUnited StatesOpt-outEverything on. A footer link opens the settings. Global Privacy Control honoured.
DefaultEverywhere elseNotice only or opt-outA short notice, everything on.

In the US rule the settings panel often has one main switch for selling and sharing, tied to the Targeting category, C0004. Switching it off removes C0004 from OnetrustActiveGroups, and any GTM trigger built on it stops the ad tags. I covered those triggers in How OneTrust tells Google Tag Manager what a visitor chose.

Google Consent Mode needs a different default in each rule. For Europe, all four main types start denied: analytics_storage, ad_storage, ad_user_data and ad_personalization. For the US they start granted, and an opt-out denies the three ad types while analytics carries on. The full mapping is in Mapping OneTrust categories to Google Consent Mode.

What it does to your reports

Opt-in loses everyone who ignores the banner. Opt-out loses only the people who go looking for the link. So after a launch like this, expect measured traffic from Europe to fall a lot and traffic from the US to barely move.

Someone will see "sessions down 40% in Germany" and ask what went wrong with demand. Nothing did. Add an annotation on the launch date, and report the consent rate next to traffic so the gap has an explanation sitting right beside it.

Test every rule

Which countries and states go into which rule is a decision for the privacy or legal team. Making sure each rule does what was decided is the analyst's part. Use a VPN to visit as Europe, as California and as somewhere in neither, and check what loads before and after each choice. Rules that were never tested from their own region are where the surprises live.

More articles

Does your site honour Global Privacy Control?

Some browsers tell every site "don't sell or share my data". In California that signal counts as an opt-out. Here's how to check that your site listens.

5 minute read

How to read OneTrust's OptanonConsent cookie

OneTrust writes every choice into one cookie. Decode it and you can answer "what did this visitor agree to?" in seconds.

5 minute read

How OneTrust tells Google Tag Manager what a visitor chose

One variable and two events carry every consent choice from OneTrust into GTM. Here's how to read them and build triggers that don't miss.

6 minute read

Mapping OneTrust categories to Google Consent Mode

OneTrust thinks in cookie categories, Google thinks in seven consent types. A mapping that works, and the one setting that causes double defaults.

7 minute read

Consent checks or triggers? Two ways to make a tag wait in GTM

Google Tag Manager can hold a tag back with consent settings or with trigger conditions. They behave differently when a visitor changes their mind.

6 minute read

Does your cookie banner block anything?

A banner can look right and still let every tag fire. Four checks, all in your own browser.

5 minute read

How to check your dataLayer in five minutes

A quick routine, using only your browser, to see whether your site is sending the data your tags depend on.

6 minute read

Dashboards that answer one question well

Why most dashboards get ignored, and a simple way to design ones that people open every week.

7 minute read

Why tags break after a site update

The usual reasons tracking fails after a release, and a short checklist to stop it happening to you.

6 minute read

Can you trust your data?

Tell me what you track, and what you ask visitors before you track it.

Start a project