How can we help you?

Configuring Location Detection and Data Sources

Accurate location detection is the foundation of the Geo Targeting Extension. This article explains how the plugin identifies visitor locations, how to set up and maintain the MaxMind GeoLite2 database, how the IP-API fallback works, and how to verify that your detection sources are functioning correctly. When configured properly, these data sources enable you to target visitors at the country, region, city, or IP address level—quickly, reliably, and privately.

⚙️ Understanding Location Detection in Instant Popup Builder

When a visitor lands on your website:
  1. The extension collects the visitor’s IP address.
  2. It uses a primary data source (MaxMind GeoLite2) to match the IP to a location.
  3. If MaxMind is unavailable or not configured, it automatically switches to the IP-API fallback service.
  4. The resulting data (country, region, city) is stored temporarily and used to evaluate popup rules.

️ MaxMind GeoLite2 Setup (Recommended)

Why choose MaxMind: The MaxMind GeoLite2 City database provides high-accuracy, offline, and low-latency geolocation data. It’s the preferred method for production sites.

Step 1: Get a Free MaxMind License Key

  1. Go to MaxMind GeoLite2 Signup.
  2. Create a free MaxMind account.
  3. Navigate to My License KeysGenerate New License Key.
  4. Copy the generated key — you’ll need it in the WordPress settings.

Step 2: Configure in WordPress

  1. Log in to your WordPress admin dashboard.
  2. Go to Popup Builder → Settings → GEO Location Settings.
  3. Locate the MaxMind License Key field.
  4. Paste your license key and click Save Changes.

Step 3: Verify Download

  • The plugin automatically downloads and installs the GeoLite2-City.mmdb database.
  • You’ll see a success message:
    ✅ “GeoLite2 City database downloaded successfully.”
  • File location (for reference):
    /wp-content/uploads/geo_targeting/GeoLite2-City.mmdb
    

Step 4: Confirm Functionality

  • Reload the GEO Location Settings page.
  • The system should now show “Using MaxMind GeoLite2” as the active detection method.
  • Optionally test detection using a different IP (VPN or proxy) and observe correct location matching.

IP-API Fallback Configuration

Purpose: Ensures continuous geolocation service if MaxMind isn’t available, your license expires, or the database hasn’t downloaded yet. Key Points:
  • Works automatically — no setup required.
  • Uses live API lookups from ip-api.com.
  • Provides country, region, and city information.
  • Free to use with a rate limit of 45 requests per minute from the same IP.
Advantages:
  • Zero configuration
  • Immediate results
  • Good accuracy for most commercial use cases
Limitations:
  • Requires outbound HTTP access
  • Rate-limited for high-traffic sites
  • Slightly slower than local database lookups
  • Cannot function offline
Tip: Keep MaxMind enabled even if you use IP-API. The plugin automatically switches between both methods based on availability.

Switching or Verifying Detection Sources

The Geo Targeting Extension intelligently prioritizes MaxMind when available and reverts to IP-API if needed.

To Manually Check Your Current Source:

  1. Go to Popup Builder → Settings → GEO Location Settings.
  2. Review the Detection Status message. It will display one of:
    • Using MaxMind GeoLite2 Database
    • ⚙️ Using IP-API Fallback (MaxMind not configured)

To Switch Between Sources:

  • To MaxMind: Add or re-save your MaxMind license key.
  • To IP-API: Leave the MaxMind field empty or delete the key.
  • Save changes and refresh the page to confirm the active source.
Configuring accurate location detection ensures your popups are displayed to the right visitors at the right time. By setting up MaxMind GeoLite2 and confirming IP-API fallback, you guarantee reliable, fast, and compliant geolocation for every campaign.