Using CloudFlare for Geolocation
Article Topics: Setup
NATS uses GeoIP to determine the location of visitors who hit your site. This is to ensure NATS can provide the best reporting to our customers. Should you wish to use CloudFlare IP geolocation, we have provided a way to accomplish this.
CloudFlare's IP Geolocation adds the cf-ipcountry header to all requests to your server, while cf-region-code adds the visitor's region code. NATS will use these headers, if present, to determine the visitor's country and/or region.
Enable IP Geolocation at Cloudflare
Log in to your Cloudflare account and go to a specific domain.
Go to Network.
Switch the toggle for IP Geolocation to On.
Learn more at https://developers.cloudflare.com/network/ip-geolocation/.
Configure in NATS
The Prefer Cloudflare Geo Location setting can be found in the Surfer Section of the Configuration Admin, underneath the Tracking settings. Enabling this setting will prioritize the CloudFlare headers, falling back to the settings configured in IP Filter.

Related Articles
GeoIP2Last updated
Was this helpful?