How to Enable Cloudflare IP Geolocation

Note

This feature was added in WP Statistics version 14.12.

Using Cloudflare for geolocation detection can reduce server load, especially for websites with high traffic. We recommend enabling this feature for better performance. Follow the steps below to configure Cloudflare settings:

Step 1: Enable IP Geolocation in Cloudflare

  1. Log in to your Cloudflare account and select the specific domain.
  2. Go to the Network tab in the dashboard.
  3. Find IP Geolocation and switch the toggle to On.

Learn more about IP Geolocation in Cloudflare

Step 2: Add Visitor Location Headers

  1. Log in to the Cloudflare dashboard and select your account and website.
  2. Navigate to Rules > Transform Rules.
  3. Select the Managed Transforms tab.
  4. Enable the desired transform to add Visitor Location Headers.

Learn more about Managed Transforms and Location Headers

Why Use Cloudflare for Geolocation Detection?

Once these settings are enabled, WP Statistics will fetch visitor geolocation data using Cloudflare headers instead of relying on server-side detection methods like MaxMind GeoIP.

Where to Enable This Feature

You can enable this feature in WP Statistics by going to:
Settings → Advanced Options → GeoIP Settings → Location Detection Method

Select Cloudflare IP Geolocation from the options.

Let’s get started
Take your business to next level

Become part of our growing family of +600,000 users and get the tools you need to make smart choices for your website. Simple, powerful insights are just a click away.

Get our special CHRISTMAS Offer

Claim now!

Coupon Code: