Docs menu

Regional rules (geo-IP)

Consent model driven by visitor location: EEA/UK/CH/US/California/Brazil buckets, the geo source, caching and fallbacks.

Regional rules (geo-IP)

Instead of one consent model for the whole world, you can match the model to the visitor's location: opt-in where the law requires it (the EEA), and opt-out or notice-only where it is permitted (e.g. parts of the US). The feature is off by default — without it, the single model configured for the domain applies.

Buckets and resolution order

BucketCoversFallback when no rule set
EEA27 EU countries + Norway, Iceland, LiechtensteinRest of the world → domain model
United KingdomGBEEA rule → Rest of the world → domain model
SwitzerlandCHEEA rule → Rest of the world → domain model
US (outside California)US except CARest of the world → domain model
US — CaliforniaUS, state CAUS rule → Rest of the world → domain model
BrazilBR (LGPD)Rest of the world → domain model
Rest of the worldall remaining countriesdomain model

For each bucket you pick opt-in, opt-out or notice-only — or leave "domain model". The selected model behaves exactly like the global one: it drives the default state of category toggles and the banner's behaviour.

How the banner knows the location

With rules enabled, the SDK asks the /api/geo endpoint once a day; the endpoint reads the country (and US region) from CDN network headers on the CookieHug server side. The visitor's IP address is never stored — the response contains only a country and region code, cached for 24 h in the visitor's browser.

Safeguards:

  • A hard 800 ms timeout — if geo does not answer in time, the banner starts without delay.
  • When geo is unavailable, the SDK falls back to the browser time zone as an approximation (EEA / California / Brazil).
  • When the location cannot be determined at all — the domain model applies (safe fallback).
  • Domains with the feature disabled make no extra request whatsoever.

Enabling

  • Dashboard → domain → Advanced → Consent policy → the Regional rules (geo-IP) card.
  • Flip the switch and assign models to the buckets you need; leave the rest as "domain model".
  • Saving is automatic; the banner script refreshes within ~5 minutes.

What about Google Consent Mode?

Regional rules drive the banner's consent model. Google Consent Mode signals still start conservatively as denied and change only after the visitor's decision — regional GCM defaults are a separate configuration in the Google section (Consent Mode v2). With geo enabled, the `CookieHug.regulations` object carries more accurate values (gdprApplies, ccpaApplies, region).