> For the complete documentation index, see [llms.txt](https://ae-docs.keywordrush.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ae-docs.keywordrush.com/geotargeting.md).

# Geotargeting

From Affiliate Egg 6.9, you can display different storefronts for users in different countries, based on their IP address.

To use this feature:

1. Install the free plugin **GeoIP Detection**: <https://wordpress.org/plugins/geoip-detect/>
2. Configure **GeoIP Detection** (refer to the plugin's documentation).
3. You can now use additional parameters in Affiliate Egg storefront shortcodes.

An example:

```php
[affegg id=1 country_code=US region_name=California]
```

Available parameters:

* `country_code`
* `country_name`
* `region`
* `region_name`
* `city`
* `continent_code`

Go to `Tools` → `GeoIP Lookup` to check how these parameters are stored in the plugin.

![](/files/-M5WLo60tluLKElVBXFs)

You can combine multiple parameters, separated by commas.

For example, the following shortcode displays the storefront to users in California and Arizona (USA):

```php
[affegg id=1 country_code=US region_name=California,Arizona]
```

You can prefix a value with `!` to exclude it — the storefront will be shown to all users **except** those matching the value.

For example, this shortcode makes the storefront visible to everyone except users from Australia:

```php
[affegg id=1 country_code=!AU]
```

GeoIP databases are not 100% accurate or complete, so you can use the special value `null` for cases where a user's data cannot be determined. For example, the following shortcode displays the storefront for users from the US, as well as users whose state cannot be identified in the GeoIP database:

```php
[affegg id=1 country_code=US region_name=null]
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://ae-docs.keywordrush.com/geotargeting.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.
