c15t
/
C15T Logo
Select a framework
Frameworks
Welcome to c15t Docs
Introduction to Consent Management (c15t)
AI Tools Integrations
OSS
Contributing to c15t.com
License
Building Privacy Tools in the Open
Legal
Cookie Policy
Privacy Policy
C15T Logo
HomeFrontendIntegrationsSelf HostChangelog
xbskydiscordgithub1.4k
c15t
/
C15T Logo
Select a framework
Frameworks
Welcome to c15t Docs
Introduction to Consent Management (c15t)
AI Tools Integrations
OSS
Contributing to c15t.com
License
Building Privacy Tools in the Open
Legal
Cookie Policy
Privacy Policy
home-2Docs
chevron-rightFrameworks
chevron-rightJavascript
chevron-rightStore
chevron-rightLocation-info

Location Info

How to view and update the user's location

The locationInfo property stores the user's location (for example, to determine whether to show an EU GDPR banner).

This property is updated when the consent banner is fetched, and defaults to null when the location cannot be determined, such as in offline mode. The location information can be updated via the setLocationInfo() method, which accepts a LocationInfo object or null.

Usage

setLocationInfo({
  countryCode: 'US',
  regionCode: 'CA',
  jurisdiction: 'CCPA'
});

console.log(locationInfo);

Returns

Available in other SDKs

nextNext.jsreactReact
C15T Logo
Leverage native React components for seamless integration and high performance in a robust Consent Management solution that empowers your development team while prioritizing privacy and compliance.
Product
  • Documentation
  • Components
Company
  • GitHub
  • Contact
Legal
  • Privacy Policy
  • Cookie Policy
c15t