# Geolocation criterion

The Geolocation criterion is both a segmentation criterion and a triggering criterion.\
It enables you to create a [***segment***](/assets-library/creating-and-managing-segments.md) or a [***trigger***](/assets-library/creating-and-managing-triggers.md).\
To learn how to create a segment, please refer to this [***article***](/web-experimentation-and-personalization/targeting-step/how-to-create-a-segment-who-section.md).\
To learn how to create a trigger, please refer to this [***article***](/web-experimentation-and-personalization/targeting-step/how-to-create-a-trigger-how-section.md).

## **📖** Definition <a href="#h_01hhma5c40ac3awwdbqy16szt1" id="h_01hhma5c40ac3awwdbqy16szt1"></a>

The Geolocation criterion enables you to restrict the visibility of a campaign to visitors based on their geographical location.

The location of a visitor is determined by an IP geolocation database provided by an external service and can be collected as soon as the visitor give their consent.

We use an external service called [MaxMind](https://www.maxmind.com/en/home).

{% hint style="warning" %}
The accuracy of the IP is determined by the service coverage and Internet provider of each country. It can vary.
{% endhint %}

## **⚙️** Configuration <a href="#h_01hhma5c407fbqx2xhdwjrqzzj" id="h_01hhma5c407fbqx2xhdwjrqzzj"></a>

The configuration of the Geolocation criterion is the same for segments and triggers.

You must choose from the following operators to configure your criterion, which will determine the operation behind the value you will declare:

* **`is`:** to include the location. If you include a specific location, all the other locations will automatically be excluded from the targeting.
* **`is not`:** to exclude the location. If you exclude a specific location, all the other locations will automatically be included in the targeting.

Then, select the country from the second drop-down list. You can also refine criteria by selecting a specific region, sub-region, and city (depending on the country you are targeting). You can save your configuration at every step depending on your needs (at a country/region/sub-region/city level).

To include a country except for a specific zone, you need to exclude this zone from the targeting. For example, if you want to target your visitors located in the US except for those located in New York City, select `is not` >*United States of America* > *New York*(region) > *New York*(city). This way, all countries will be included in the targeting, including people located outside of New York city.

<img src="/files/s3s1euAdUGjv4e3faQaW" alt="" width="563">

On the contrary, if you want to exclude a specific country, the other countries will be included in the targeting of your campaign.

{% hint style="info" %}
If you want to include France and exclude Belgium, you don’t need to configure the inclusion and the exclusion in the targeting of your campaign.\
Indeed, if you select *is* > *France*, Belgium will be automatically excluded and if you select *is not* > *Belgium*, France will be automatically included.
{% endhint %}

## **💡** Use case <a href="#h_01hhma5c402cm0de61p5c9d1er" id="h_01hhma5c402cm0de61p5c9d1er"></a>

For example, if you want to display a popup on your website to inform users located in Florida that there is a physical store in Miami, you need to display the personalization campaign to users located in this specific area.\
To do so, select `is` > *United States of America* > *Florida* in the segment of your campaign.

<img src="/files/qoO8l4xdrqPo3czYNhgE" alt="" width="563">

### Troubleshooting area <a href="#h_01hndea817pjn87j1dn0m63w4r" id="h_01hndea817pjn87j1dn0m63w4r"></a>

In case you need support, follow the instructions given in the articles below:

💡[\[Troubleshooting\] QA a campaign with a geolocation targeting](/help-center/troubleshooting/troubleshooting-qa-a-campaign-with-a-geolocation-targeting.md)

**Need additional information?**

Submit your request at <product.feedback@abtasty.com>

Always happy to help!

<img src="/files/YfbVH7KV1VX9S7a4lynj" alt="" width="146">


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/assets-library/creating-and-managing-triggers/list-of-trigger-criteria/geolocation-criterion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
