DEAL ENDS IN:

SUMMER SALE!

UP TO 40% OFF!

GET IT NOW

The Geolocation Condition

If-So’s geolocation condition lets you tailor your website content according to the visitor’s physical location: continent, country, state, city, or even timezone.

How can your site benefit from geolocation-based content?

Common Use Cases

Create promotions in specific countries

promotions in specific countries

Highlight different products in chosen locations

Highlight different products in specific locations

Direct visitors to the closest branch

Direct users to the nearest branch

Show personalized messages to visitors from certain locations

Location-based messages

How does it work

To detect the user’s location, If-So uses an up-to-date geolocation API to pair between the IP address and the geographical location.

Which content can be customized using the geolocation condition?

As with any of If-So’s dynamic triggers, the choice is yours. Any content on your website can be customized. That includes titles, texts, images, calls to action, buttons, and more.

How accurate is the location detection?

The accuracy of a location depends on many factors, most importantly, the ISP of the address. For some providers, there is street-level accuracy, and for most, city-level accuracy.

Generally, accuracy is higher for fixed lines as opposed to cellular networks. Learn more about geolocation accuracy here.

Note: For significantly higher, street-level accuracy, If-So lets you combine the HTML5 Geolocation API with IP-based detection. Users who give consent will see highly precise results based on their device location; others will see standard IP-based results.

Geolocation DKI (Dynamic Keyword Insertion)

The geolocation Dynamic Keyword Insertion lets you display the user’s location using a simple shortcode.

The available shortcodes are:

Display the user’s country

[ifsoDKI type="geo" show="country"] 

Display the user’s state

[ifsoDKI type="geo" show="state"] 

Display the user’s city

[ifsoDKI type="geo" show="city"]  

Display the user’s continent

[ifsoDKI type="geo" show="continent"] 

Display the user’s timezone

[ifsoDKI type="geo" show="timezone"] 

Click here to learn more about If-So DKI

How to set up geolocation-based content?

*Elementor or Gutenberg user? This condition can be used to set up a conditional element or block (Learn more: Gutenberg | Elementor).

  1. On your WordPress dashboard, go to “If-So → Add New Trigger”.
  2. Click on “Select a condition” and select “Geolocation“.
  3. Start typing a continent, country, state, or city name and use the autocomplete list to select a location. You can choose as many locations as you like. Press the “x” button to remove an entry from the chosen targeted locations.
  4. In the content field, type the content to be displayed if the visitors’ location matches your criteria.
  5. In the default content field, type content to be displayed if the visitors’ location does not match your targeting (this is optional and can be left blank).
  6. Press “Publish” and paste the shortcode generated by If-So on your website wherever you want it to be.

Monthly Session Limit

Geolocation usage is limited by the number of monthly sessions (it’s the only If-So condition that is limited). The beginning of a session is defined as when a visitor first visits a page with a geolocation trigger. The end of a session is when either a visitor closes the browser, or there have been more than 25 minutes of inactivity (it may vary slightly between browsers).

Click here for the geolocation pricing options.

Displaying the visitor’s country flag

If-So allows you to display the visitor’s country flag. Learn more.

Troubleshooting the Geolocation Condition

If you set up a geolocation trigger and it seems to not be working properly, there are a few common reasons to consider. Click here for the geolocation troubleshooting guide.

FAQs

  • What is the WooCommerce “Single Product Redirect” option?

    The Single Product Redirect option lets you control what happens when a user accesses a blocked product page directly (for example, by typing in the URL or clicking a saved link).

    If the user meets the condition you set (e.g., they’re from a specific country or region), they will automatically be redirected to a different page instead of seeing the blocked product.

    This helps you avoid showing irrelevant or restricted content – and keeps the user experience smooth.

    If you leave this field blank, users located in restricted locations will still be able to access the WooCommerce product page via a direct link.

    This option allows you to redirect all restricted products to the same URL. If you’re interested in redirecting users to different URLs, check out our geolocation redirect options:

    Would you like to redirect users to a completely different page or website? If so, please refer to the following resources:

    1. Redirection Templates
    2. Geolocation Redirect

Screenshots

1 3

2 3
3 4
4 3

5 3
6 2
7 1

8
Ready to get started?
Try it on your website