Location Info
Access detected jurisdiction, country, and region. Override geolocation for testing.
locationInfo
The locationInfo state contains the user's detected geographic information:
locationInfo is null until the backend responds with geolocation data (or in offline mode if no overrides are set).
Jurisdiction Codes
| Code | Region | Consent Model |
|---|---|---|
GDPR | European Union | opt-in |
UK_GDPR | United Kingdom | opt-in |
CH | Switzerland | opt-in |
BR | Brazil (LGPD) | opt-in |
APPI | Japan | opt-in |
PIPA | South Korea | opt-in |
PIPEDA | Canada (excl. Quebec) | opt-out |
QC_LAW25 | Quebec, Canada | opt-in |
CCPA | California, USA | opt-out |
AU | Australia | opt-out |
NONE | No jurisdiction | null model |
setOverrides()
Override detected values for testing or manual configuration. This triggers a re-fetch of consent banner data with the new values:
setLocationInfo()
Directly set location info without triggering a re-fetch:
Testing Different Jurisdictions
A development-only component for testing consent behavior across jurisdictions: