Certainly! With our geolocation Dynamic Keyword Insertion (DKI) shortcode, you can effortlessly achieve this.
For instance, if you want to showcase the user’s country, you can use the following shortcode:
[ifsoDKI type='geo' show='country']
Similar shortcodes are available to display the user’s country flag, state, city, and event time calculated based on the user’s timezone.
Nope, you don’t need the Pro version of If-So to make use of the geolocation service.
The geolocation condition comes with the free version of the plugin, and you get 250 monthly sessions with our premium IP-to-location API for accurate results (for lifetime).
If your website requires additional sessions, you can opt for one of our geolocation plans.
You don’t have to buy a Pro license along with a geolocation plan if you only want to use the geolocation condition.
We strive for maximum accuracy by utilizing a premium, highly accurate IP-to-location API.
However, it’s important to note that no geolocation service can guarantee 100% accuracy. Several factors influence the accuracy of the location data, with the ISP of the IP address being a key factor. Accuracy is generally higher for fixed lines than it is for cellular networks.
If you come across any inaccuracies, please report them to us, and we will ensure that the database is updated accordingly.
Gain a deeper understanding of IP-based geolocation services and their operational principles
If-So utilizes the ipinfo.io premium IP-to-location API for geolocation-based content. This database has shown high accuracy compared to similar databases.
The database is regularly updated to ensure the most up-to-date information. If you come across any inaccuracies, please report them to us, and we will ensure that the database is updated accordingly.
We also have plans to introduce at least one additional option for geolocation services in the future. This will allow you to switch between different options based on your preferences and requirements.
Absolutely! You can implement a manual user location selection form (location override) that empowers users to choose a different location than the one automatically detected by our IP-to-location service.
Dynamic content will be displayed based on the user’s selection. For additional information, please refer to our detailed guide.
No, there’s no need to disable the geolocation service. The geolocation functionality will only be active if you set up location-based content.
A geolocation session refers to the period of time starting from when a visitor accesses a page with a geolocation trigger until either the visitor closes the browser or remains inactive for 25 minutes (the duration may slightly vary depending on the user’s browser and server hosting the website).
To illustrate, if a visitor lands on the homepage, navigates to multiple other pages, and eventually leaves, this activity will be counted as a single session.
The table below illustrates how different visitor interactions impact the session count on a website with geotargeted content:
Scenario | Session Count |
---|---|
A visitor only views pages without geotargeted content and then leaves | 0 |
A visitor views a page with conditional content, the geolocation condition is not one of the conditions (other If-So conditions are used). | 0 |
A visitor browses multiple pages within a single session | 1 |
A visitor visits a page with geotargeted content, and then refreshes the page | 1 |
A visitor views a page, closes the tab, and returns to the site after 15 minutes | 1 |
A visitor views a page with geotargeted content, but their location doesn’t match any targeted locations (default content is shown). *The user’s location still needs to be checked in this case. | 1 |
Nope!
A geolocation session will only be counted if a user visits a page with a geolocation-based trigger.
Moreover, if a user visits more than one page containing a geolocation trigger during the same visit, If-So will only count it as one session.
If you deplete your geolocation sessions, If-So will bypass the geolocation condition and evaluate the condition of the subsequent content version. If all dynamic versions have a geolocation condition or if none of the conditions are met, the default version will be displayed.
If you are utilizing our Geolocation DKI shortcodes, you can establish a fallback value to be shown in such instances. Just include the parameter fallback=”your-value” to the trigger shortcode.
[ifsoDKI type=”geo” show=”country” fallback=”your-value”]
Yes, you can. You have the option to either activate the automated “Bots Block” mode or log geolocation requests and manually block specific IPs. Learn more.
You can check your monthly session quota in two locations:
Screenshot – The geolocation dashboard:
Screenshot – Your account:
No, a geolocation license is sufficient if you only want to use the geolocation service.
Absolutely! There are no limitations on the number of domains where you can activate a geolocation license.
Certainly not!
Yes. To determine the user’s location for deciding whether to display geotargeted content, we need to check the user’s location. As a result, a session will be counted irrespective of whether the geotargeting condition is met or not.
Absolutely! You have the flexibility to upgrade your existing license at any time. How to upgrade my plan.
The session limit applies to the total number of sessions across all websites where the license is active.
Yes, we do!
When you purchase an annual Geo Super Plan (100,000 monthly sessions), you’ll have the ability to easily upgrade your package.
Additional packages of 50,000 monthly sessions are offered at a rate of $12.50 per month on a yearly subscription basis. You have the flexibility to purchase as many packages as you need to meet your specific requirements.
It appears that there is a communication issue between our server and yours. No need to worry though, we can resolve it. Kindly follow these two steps:
Stay calm and refer to our Geolocation Troubleshooting guide for assistance.
Inaccurate session counts can occur when bots visit the website. Learn about possible solutions to address this issue.
If you are unable to see the country flags, it is likely because your browser does not support emoji display by default (Google Chrome on a desktop for example).
If-So utilizes an IP-to-location database to determine the user’s location. You can use the geo data detected by If-So for any purpose by implementing the following code:
require_once(IFSO_PLUGIN_BASE_DIR. 'services/geolocation-service/geolocation-service.class.php');
$geo_data = \IfSo\Services\GeolocationService\GeolocationService::get_instance()->get_user_location();
Keep in mind that IP-to-location services (any service, not just ours) are not always 100% accurate. Learn more about IP-to-location services and how they work.
Want to capture the user’s location using JavaScript? Click here
Yes, you can capture the user’s country in JavaScript by using the following PHP code in your theme’s functions.php file. This code fetches the user’s geolocation data and sets it as a JavaScript variable:
phpCopy codeadd_action('wp_enqueue_scripts', function(){
if(!defined('IFSO_PLUGIN_BASE_DIR')) return;
require_once(IFSO_PLUGIN_BASE_DIR. 'services/geolocation-service/geolocation-service.class.php');
$geo_data = \IfSo\Services\GeolocationService\GeolocationService::get_instance()->get_user_location();
$ifso_country = !empty($geo_data->get('countryCode')) ? $geo_data->get('countryCode') : '';
if(function_exists('wp_add_inline_script'))
wp_add_inline_script('if-so',"var ifso_country = '{$ifso_country}';",'after');
});
This code will make the user’s country available as a variable named ifso_country
in your JavaScript. You can customize this code to capture other geolocation data, such as city or state, by adjusting the values in the code.