Configuration

You are here:

GeotargetingWP first steps:

  1. Go to your account api keys page and enter your website full domain (including www) in the whitelist field. Copy your Api and secret keys.

  2. Install and activate GeotargetingWP plugin.

  3. If it's the first time you install the plugin you will get a wizard welcome page where you need to paste the keys obtained in the first step and choose which addons you want to enable.

    wizard

  4. Once you finish, go to GeotargetingWP -> Settings -> Debug data page and check that geolocation data it's filled with your correct location.

If you see any error like the image below, it means that the plugin is not fully configured or something went wrong.

geolocation error

If you get the error Wrong signature in request go to the api keys page and copy again the keys into your plugins. If that don't work click the reset button and then paste your new keys in the plugin

It's important to read the following section as these settings will change completely the behaviour of the plugin and vary the requests consumption.

Main Settings

Cache mode:

To avoid the waste of resources when "Cache mode" is turned on we save the user geolocation once it’s generated. That means that if you change your location using a VPN you will still see the first location you used to visit the site unless you deactivate cache mode.

When enabled, the user location will be saved into the PHP session. Because it uses PHP SESSIONS cache mode has to run BEFORE any content is rendered. That means that we need to calculate the user location before anything happens and on every page of your site. If you are not planning to use geotargeting site-wide is not worth to enable it as it will end consuming more requests.

In other words if you are planning to add some shortcodes in only one page of your site, keep cache mode turned off.

Disable to be able to test different shortcodes and functions easily ( More info on debugging page).

Also please read how to save requests where we mention some tips.

Geolocation:

You can geolocate users using two different methods with three different variants.

  • Ip Geolocation: It's the default method and it will take the location based on user's IP Address. Works great for Countries, States and 90% of cities. Mobile phones accuracy is not as good due to cell towers sharing Ips
  • GPS for mobile + Ip Geolocation for desktop: With this mode mobile phones will provide their gps location (consent needed from user) and desktop computers will continue to use IP geolocation. This mode only works with AJAX mode turned on.
  • GPS for mobile and desktop: Both devices will use HTML5 geolocation to get the information. It's possible that browsers doesn't have accurate location on certain ocassions. This mode only works with AJAX mode turned on.

AJAX mode:

All geo actions, replacements and redirects will occur after the page it's loaded. An AJAX call it's performed to bypass any page cache plugin. Please read the full guide about ajax in here

IP Settings:

On this field we show the IP the plugin detects. If you see more than one option you need to choose your real IP which should match the one you can see in here. That way the plugin will know which IP should read from the sources provided by the server. We do support multiple DNS providers such as Cloudflare, Reblaze, Sucuri, etc

Bots and fallback country:

In these fields you could add an IP like your own server IP or a service that crawls your site and you don't want it to consume all your requests. Usually the country you choose here it's the country of your main content. While both fields works the same, the bots country field will automatically detect bots and crawlers that use a recognized user agent.

So in other words every IP or block IP added here won't consume requests and will automatically resolve to the chosen country.

Both fields works the same, it's just in case you want to separate bots from real users and give them two different locations.