Geolocation

WP Full Picture uses geolocation to show cookie notice and load scripts in certain locations. All geolocation service providers available in WP Full Picture offer free services, but some of them require registration or extra setup.

Available service providers:

  1. Cloudflare (website)
  2. ipdata (website)
  3. ipapi (website)
  4. DB-IP (website).
  5. Cloudways Geo-IP – only for Cloudways users (website).

Read below for more information.

Cloudflare (with/without registration)

cloudflare home

Cloudflare is the default geolocation provider in WP Full Picture. It does not require registration and works out-of-the-box. If you do register in Cloudflare, please change the geolocation method to Cloudflare (with registration).

Drawbacks:

Cloudflare provides only country geolocation, so if you want to, e.g. show cookie notice only in specific regions, like California, US; you will have to choose a different provider.

Cloudflare (with Worker)

You may use Cloudflare Worker if you have problems with other Cloudflare geolocation methods.

Drawbacks:

  1. It can be used only on websites that use Cloudflare’s DNS (free).
  2. Cloudflare provides only country geolocation, so if you want to, e.g. show cookie notice only in specific regions, like California, US; you will have to choose a different provider.

The setup:

  1. Log in to Cloudflare
  2. Click “Workers”, then “Manage Workers” and after the page reloads “Create a Worker”
cloudflare workers 1
  1. In the new window:
cloudflare workers 2
  1. Replace the script on the left (1) with this:
addEventListener("fetch", event => {
  const response = new Response(`{"country":"${event.request.headers.get("cf-ipcountry")}"}`, {
    headers: {
      "Access-Control-Allow-Origin": "*",
      "Content-Type": "application/json"
    }
  })
  
  event.respondWith(response)
})
  1. Click “Send” button (2) and then “Preview” (3).
    If you did everything correctly, you will see your country code on the screen, like {"country": "GB")
  2. Now click “Save and Deploy” button and copy the URL that you will see in a popup window.
  3. Paste this URL in the geolocation settings field in WP Full Picture’s settings panel

And you’re done!

ipapi

ipapi home

ipapi offers country & region-level geolocation. Registration is not required.

Drawbacks:

Free service is limited to 1000 checks/day (roughly 1000 new visitors a day)

How to use it:

Choose “ipapi” in the Geolocation module’s settings

ipdata

ipdata 2 home

ipdata offers country and region-level geolocation. This means that you can use it, e.g. to show a cookie banner to visitors from California (USA) and not from the whole country.

Drawbacks:

  1. Requires registration
  2. 1500 IP lookups a day (which translates to roughly 1500 new visitors)
  3. Only for non-commercial projects

How to use it:

  1. After you register, go to the “API Settings” section and copy the API key.
  2. Choose “ipdata” as geolocation method in WP Full Picture and paste the key in the field that will show up.

DP-IP

db ip home

At the moment WP Full Picture only provides access to the free service of DB-IP with country-level geolocation.

Drawbacks:

  1. Unknown limits of the free service!
  2. Only country-level geolocation

How to use it:

To use it you simply choose “db-ip” as the service provider in the Geolocation module.

Cloudways

cloudways home

You can use Cloudways geolocation service if your website is hosted on servers managed by CW. It provides only country-geolocation but the number of IP lookups is unlimited.

Drawbacks:

  1. Only country geolocation
  2. Requires Cloudways server

How to use it:

  1. Log in to Cloudways panel
  2. Go to “Applications” and choose your website
  3. Go to “Application settings” in the left menu
  4. Enable GEO IP
  5. Enable “Cloudways” geolocation in WP Full Picture’s module