The manual user location selection option allows users to override the location detected by our IP-to-location service by manually selecting a different location. Dynamic content will be displayed based on their selection.
This feature comes in handy when the user wants to view content that is relevant to a different location than their physical location or when the IP-to-location service fails to provide an accurate location.
For example:
The flag below is displayed based on our IP-to-location service
Select a country to see how the country’s flag is displayed based on your selection:
The location override functionality requires the User Self-selection Extension and the geolocation extension to work.
If-So provides a way to create a selection dropdown or a radio button form to allow users to override their location. The form is displayed on the site using a shortcode generated by the plugin through your WordPress dashboard.
Dropdown without a button
Radio buttons with a button
A pop-up with a selection field
Select your location
To generate a manual user location selection form using If-So, you’ll need to have both the Geolocation Extension and the User Self-selection Extension installed on your website. Once you have those installed, follow these steps:
The manual user location override feature in If-So is cookie-based. When a user selects a location from the list, a cookie named “ifso-geo-override-data” is added to their browser.
If-So uses this cookie to override the IP-based location detection and treat the user’s location as if they are actually located in the selected location. This means that dynamic content will be displayed based on the selected location, regardless of the user’s actual physical location.
Display a pop-up when the page loads if users from a certain location enter the site (i.e. “Are you in….”) or leave users the option to open the pop-up to their convenience by clicking a button/link on your site.
To create a location-selection pop-up, simply insert the location-selection shortcode into an If-So trigger, and set the trigger’s content to be displayed as a pop-up. Click here for more information on creating pop-ups with If-So.
There are several options available for creating conditional content based on location (or location override):
If the values in your location override form represent countries, you have the option to display the corresponding country flag alongside the country name.
Please note that the country flags will not appear by default on desktop versions of Google Chrome and on other browsers that do not support emoji display.